1
0
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:
Bart Visscher 2012-08-10 14:33:20 +02:00
parent fe8bae5b1e
commit 8679aa2699

View File

@ -68,6 +68,7 @@ class OC_Share_Backend_Addressbook implements OCP\Share_Backend_Collection {
*/
public function formatItems($items, $format, $parameters = null) {
$addressbooks = array();
if ($format == self::FORMAT_ADDRESSBOOKS) {
foreach ($items as $item) {
$addressbook = OC_Contacts_Addressbook::find($item['item_source']);
if ($addressbook) {
@ -75,6 +76,7 @@ class OC_Share_Backend_Addressbook implements OCP\Share_Backend_Collection {
$addressbooks[] = $addressbook;
}
}
}
return $addressbooks;
}