aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/dav/lib/Search/ContactsSearchProvider.php9
-rw-r--r--apps/dav/lib/Search/EventsSearchProvider.php9
-rw-r--r--apps/dav/lib/Search/TasksSearchProvider.php9
3 files changed, 15 insertions, 12 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 {
diff --git a/apps/dav/lib/Search/EventsSearchProvider.php b/apps/dav/lib/Search/EventsSearchProvider.php
index 0cf01742672..dd87f486a1d 100644
--- a/apps/dav/lib/Search/EventsSearchProvider.php
+++ b/apps/dav/lib/Search/EventsSearchProvider.php
@@ -89,11 +89,12 @@ class EventsSearchProvider extends ACalendarSearchProvider implements IFiltering
/**
* @inheritDoc
*/
- public function getOrder(string $route, array $routeParameters): int {
- if ($route === 'calendar.View.index') {
- return -1;
+ public function getOrder(string $route, array $routeParameters): ?int {
+ if ($this->appManager->isEnabledForUser('calendar')) {
+ return $route === 'calendar.View.index' ? -1 : 30;
}
- return 30;
+
+ return null;
}
/**
diff --git a/apps/dav/lib/Search/TasksSearchProvider.php b/apps/dav/lib/Search/TasksSearchProvider.php
index 91692ea1c2a..5cb64556457 100644
--- a/apps/dav/lib/Search/TasksSearchProvider.php
+++ b/apps/dav/lib/Search/TasksSearchProvider.php
@@ -77,11 +77,12 @@ class TasksSearchProvider extends ACalendarSearchProvider {
/**
* @inheritDoc
*/
- public function getOrder(string $route, array $routeParameters): int {
- if ($route === 'tasks.Page.index') {
- return -1;
+ public function getOrder(string $route, array $routeParameters): ?int {
+ if ($this->appManager->isEnabledForUser('tasks')) {
+ return $route === 'tasks.Page.index' ? -1 : 35;
}
- return 35;
+
+ return null;
}
/**