1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-30 19:52:17 +01:00

Update getChildren() for calendar and addressbook share backends

This commit is contained in:
Michael Gapczynski 2012-09-08 23:11:40 -04:00
parent 5005796479
commit 475de65901

View File

@ -82,13 +82,13 @@ class OC_Share_Backend_Addressbook implements OCP\Share_Backend_Collection {
}
public function getChildren($itemSource) {
$query = OCP\DB::prepare('SELECT `id` FROM `*PREFIX*contacts_cards` WHERE `addressbookid` = ?');
$query = OCP\DB::prepare('SELECT `id`, `fullname` FROM `*PREFIX*contacts_cards` WHERE `addressbookid` = ?');
$result = $query->execute(array($itemSource));
$sources = array();
$children = array();
while ($contact = $result->fetchRow()) {
$sources[] = $contact['id'];
$children[] = array('source' => $contact['id'], 'target' => $contact['fullname']);
}
return $sources;
return $children;
}
}