diff options
Diffstat (limited to 'apps/dav/lib/Search/ContactsSearchProvider.php')
-rw-r--r-- | apps/dav/lib/Search/ContactsSearchProvider.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/dav/lib/Search/ContactsSearchProvider.php b/apps/dav/lib/Search/ContactsSearchProvider.php index 265f4958efb..2a0e70bf045 100644 --- a/apps/dav/lib/Search/ContactsSearchProvider.php +++ b/apps/dav/lib/Search/ContactsSearchProvider.php @@ -83,11 +83,12 @@ class ContactsSearchProvider implements IFilteringProvider { return $this->l10n->t('Contacts'); } - public function getOrder(string $route, array $routeParameters): int { - if ($route === 'contacts.Page.index') { - return -1; + public function getOrder(string $route, array $routeParameters): ?int { + if ($this->appManager->isEnabledForUser('contacts')) { + return $route === 'contacts.Page.index' ? -1 : 25; } - return 25; + + return null; } public function search(IUser $user, ISearchQuery $query): SearchResult { |