diff --git a/appinfo/app.php b/appinfo/app.php index 54008f8c..775f6ab8 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -64,8 +64,7 @@ if (\OCP\User::isLoggedIn()) { $addressBooks = $app->getAddressBooksForUser(); foreach ($addressBooks as $addressBook) { if ($addressBook->isActive()) { - // $addressBook is instance of \OCA\Contacts\Addressbook - \OCP\Contacts::registerAddressBook($addressBook->getSearchProvider($addressBook)); + \OCP\Contacts::registerAddressBook($addressBook->getSearchProvider()); } } } diff --git a/lib/addressbook.php b/lib/addressbook.php index b4e43eff..c4984839 100644 --- a/lib/addressbook.php +++ b/lib/addressbook.php @@ -487,7 +487,7 @@ class Addressbook extends AbstractPIMCollection { * Returns the searchProvider for a specific backend. * @param \OCA\Contacts\Addressbook $addressbook */ - public function getSearchProvider($addressbook){ - return $this->backend->getSearchProvider($addressbook); + public function getSearchProvider(){ + return $this->backend->getSearchProvider($this); } }