mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-02-07 01:54:16 +01:00
Update getChildren() for calendar and addressbook share backends
This commit is contained in:
parent
5005796479
commit
475de65901
@ -82,13 +82,13 @@ class OC_Share_Backend_Addressbook implements OCP\Share_Backend_Collection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getChildren($itemSource) {
|
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));
|
$result = $query->execute(array($itemSource));
|
||||||
$sources = array();
|
$children = array();
|
||||||
while ($contact = $result->fetchRow()) {
|
while ($contact = $result->fetchRow()) {
|
||||||
$sources[] = $contact['id'];
|
$children[] = array('source' => $contact['id'], 'target' => $contact['fullname']);
|
||||||
}
|
}
|
||||||
return $sources;
|
return $children;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user