Don't include shared addressbook if source not found

remotes/origin/stable45
Michael Gapczynski 13 years ago
parent d02b0e39b2
commit f4285a25ef
  1. 6
      apps/contacts/lib/share/addressbook.php

@ -69,8 +69,10 @@ class OC_Share_Backend_Addressbook implements OCP\Share_Backend_Collection {
$addressbooks = array();
foreach ($items as $item) {
$addressbook = OC_Contacts_Addressbook::find($item['item_source']);
$addressbook['displayname'] = $item['item_target'];
$addressbooks[] = $addressbook;
if ($addressbook) {
$addressbook['displayname'] = $item['item_target'];
$addressbooks[] = $addressbook;
}
}
return $addressbooks;
}

Loading…
Cancel
Save