1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-18 07:52:21 +01:00

Merge pull request #470 from owncloud/add-localusers-app

Implement getSearchProvider
This commit is contained in:
Thomas Tanghus 2014-04-23 11:39:42 +02:00
commit 7c37422c93
2 changed files with 9 additions and 1 deletions

View File

@ -64,7 +64,7 @@ if (\OCP\User::isLoggedIn()) {
$addressBooks = $app->getAddressBooksForUser();
foreach ($addressBooks as $addressBook) {
if ($addressBook->isActive()) {
\OCP\Contacts::registerAddressBook(new AddressbookProvider($addressBook));
\OCP\Contacts::registerAddressBook($addressBook->getSearchProvider());
}
}
}

View File

@ -482,4 +482,12 @@ class Addressbook extends AbstractPIMCollection {
return $events;
}
/**
* Returns the searchProvider for a specific backend.
* @param \OCA\Contacts\Addressbook $addressbook
*/
public function getSearchProvider(){
return $this->backend->getSearchProvider($this);
}
}