summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-08-05 22:41:52 +0200
committerGitHub <noreply@github.com>2020-08-05 22:41:52 +0200
commit588b6fa35e96f223601c705c985bbfa0b203fb4d (patch)
tree15fe715b6a08d70c40ff54c992e74617261ec6e5
parent519cd678eee6ab83dfdcd09f4cad1a86b0909114 (diff)
parentd2c0569b490235ae6d01087a676b2f2075a1dcb7 (diff)
downloadnextcloud-server-588b6fa35e96f223601c705c985bbfa0b203fb4d.tar.gz
nextcloud-server-588b6fa35e96f223601c705c985bbfa0b203fb4d.zip
Merge pull request #22120 from nextcloud/fix/search/ids-and-order
Fix search providers order and IDs
-rw-r--r--apps/dav/lib/Search/ContactsSearchProvider.php4
-rw-r--r--apps/dav/lib/Search/EventsSearchProvider.php4
-rw-r--r--apps/dav/lib/Search/TasksSearchProvider.php4
-rw-r--r--apps/dav/tests/unit/Search/ContactsSearchProviderTest.php2
-rw-r--r--apps/dav/tests/unit/Search/EventsSearchProviderTest.php2
-rw-r--r--apps/dav/tests/unit/Search/TasksSearchProviderTest.php2
-rw-r--r--apps/settings/lib/Search/SectionSearch.php5
7 files changed, 12 insertions, 11 deletions
diff --git a/apps/dav/lib/Search/ContactsSearchProvider.php b/apps/dav/lib/Search/ContactsSearchProvider.php
index f97ba2cf634..78747ebd70e 100644
--- a/apps/dav/lib/Search/ContactsSearchProvider.php
+++ b/apps/dav/lib/Search/ContactsSearchProvider.php
@@ -83,7 +83,7 @@ class ContactsSearchProvider implements IProvider {
* @inheritDoc
*/
public function getId(): string {
- return 'contacts-dav';
+ return 'contacts';
}
/**
@@ -100,7 +100,7 @@ class ContactsSearchProvider implements IProvider {
if ($route === 'contacts.Page.index') {
return -1;
}
- return 20;
+ return 25;
}
/**
diff --git a/apps/dav/lib/Search/EventsSearchProvider.php b/apps/dav/lib/Search/EventsSearchProvider.php
index 619775aa193..c27996f96e7 100644
--- a/apps/dav/lib/Search/EventsSearchProvider.php
+++ b/apps/dav/lib/Search/EventsSearchProvider.php
@@ -69,7 +69,7 @@ class EventsSearchProvider extends ACalendarSearchProvider {
* @inheritDoc
*/
public function getId(): string {
- return 'calendar-dav';
+ return 'calendar';
}
/**
@@ -86,7 +86,7 @@ class EventsSearchProvider extends ACalendarSearchProvider {
if ($route === 'calendar.View.index') {
return -1;
}
- return 10;
+ return 30;
}
/**
diff --git a/apps/dav/lib/Search/TasksSearchProvider.php b/apps/dav/lib/Search/TasksSearchProvider.php
index adc1197aa18..5af694bb85d 100644
--- a/apps/dav/lib/Search/TasksSearchProvider.php
+++ b/apps/dav/lib/Search/TasksSearchProvider.php
@@ -61,7 +61,7 @@ class TasksSearchProvider extends ACalendarSearchProvider {
* @inheritDoc
*/
public function getId(): string {
- return 'tasks-dav';
+ return 'tasks';
}
/**
@@ -78,7 +78,7 @@ class TasksSearchProvider extends ACalendarSearchProvider {
if ($route === 'tasks.Page.index') {
return -1;
}
- return 10;
+ return 35;
}
/**
diff --git a/apps/dav/tests/unit/Search/ContactsSearchProviderTest.php b/apps/dav/tests/unit/Search/ContactsSearchProviderTest.php
index 858e79d4423..1ca0457adb6 100644
--- a/apps/dav/tests/unit/Search/ContactsSearchProviderTest.php
+++ b/apps/dav/tests/unit/Search/ContactsSearchProviderTest.php
@@ -88,7 +88,7 @@ class ContactsSearchProviderTest extends TestCase {
}
public function testGetId(): void {
- $this->assertEquals('contacts-dav', $this->provider->getId());
+ $this->assertEquals('contacts', $this->provider->getId());
}
public function testGetName(): void {
diff --git a/apps/dav/tests/unit/Search/EventsSearchProviderTest.php b/apps/dav/tests/unit/Search/EventsSearchProviderTest.php
index eedbe39f12a..cd905760fac 100644
--- a/apps/dav/tests/unit/Search/EventsSearchProviderTest.php
+++ b/apps/dav/tests/unit/Search/EventsSearchProviderTest.php
@@ -250,7 +250,7 @@ class EventsSearchProviderTest extends TestCase {
}
public function testGetId(): void {
- $this->assertEquals('calendar-dav', $this->provider->getId());
+ $this->assertEquals('calendar', $this->provider->getId());
}
public function testGetName(): void {
diff --git a/apps/dav/tests/unit/Search/TasksSearchProviderTest.php b/apps/dav/tests/unit/Search/TasksSearchProviderTest.php
index 7220ff4ef48..732625980e8 100644
--- a/apps/dav/tests/unit/Search/TasksSearchProviderTest.php
+++ b/apps/dav/tests/unit/Search/TasksSearchProviderTest.php
@@ -134,7 +134,7 @@ class TasksSearchProviderTest extends TestCase {
}
public function testGetId(): void {
- $this->assertEquals('tasks-dav', $this->provider->getId());
+ $this->assertEquals('tasks', $this->provider->getId());
}
public function testGetName(): void {
diff --git a/apps/settings/lib/Search/SectionSearch.php b/apps/settings/lib/Search/SectionSearch.php
index 795b9f7e9f7..b90eda42bb6 100644
--- a/apps/settings/lib/Search/SectionSearch.php
+++ b/apps/settings/lib/Search/SectionSearch.php
@@ -62,7 +62,7 @@ class SectionSearch implements IProvider {
* @inheritDoc
*/
public function getId(): string {
- return 'settings_sections';
+ return 'settings';
}
/**
@@ -79,7 +79,8 @@ class SectionSearch implements IProvider {
if ($route === 'settings.PersonalSettings.index' || $route === 'settings.AdminSettings.index') {
return -1;
}
- return 20;
+ // At the very bottom
+ return 500;
}
/**