mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Contacts: Check format parameter
This commit is contained in:
parent
fe8bae5b1e
commit
8679aa2699
@ -68,11 +68,13 @@ class OC_Share_Backend_Addressbook implements OCP\Share_Backend_Collection {
|
|||||||
*/
|
*/
|
||||||
public function formatItems($items, $format, $parameters = null) {
|
public function formatItems($items, $format, $parameters = null) {
|
||||||
$addressbooks = array();
|
$addressbooks = array();
|
||||||
foreach ($items as $item) {
|
if ($format == self::FORMAT_ADDRESSBOOKS) {
|
||||||
$addressbook = OC_Contacts_Addressbook::find($item['item_source']);
|
foreach ($items as $item) {
|
||||||
if ($addressbook) {
|
$addressbook = OC_Contacts_Addressbook::find($item['item_source']);
|
||||||
$addressbook['displayname'] = $item['item_target'];
|
if ($addressbook) {
|
||||||
$addressbooks[] = $addressbook;
|
$addressbook['displayname'] = $item['item_target'];
|
||||||
|
$addressbooks[] = $addressbook;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $addressbooks;
|
return $addressbooks;
|
||||||
@ -88,4 +90,4 @@ class OC_Share_Backend_Addressbook implements OCP\Share_Backend_Collection {
|
|||||||
return $sources;
|
return $sources;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user