]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix search providers order and IDs 22120/head
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Wed, 5 Aug 2020 15:56:01 +0000 (17:56 +0200)
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Wed, 5 Aug 2020 15:57:17 +0000 (17:57 +0200)
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
apps/dav/lib/Search/ContactsSearchProvider.php
apps/dav/lib/Search/EventsSearchProvider.php
apps/dav/lib/Search/TasksSearchProvider.php
apps/dav/tests/unit/Search/ContactsSearchProviderTest.php
apps/dav/tests/unit/Search/EventsSearchProviderTest.php
apps/dav/tests/unit/Search/TasksSearchProviderTest.php
apps/settings/lib/Search/SectionSearch.php

index f97ba2cf634c30f767b4231de28cfba0aaf56042..78747ebd70e076c32e9c8d56d8173018c611b031 100644 (file)
@@ -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;
        }
 
        /**
index 619775aa19306b543eb1fc42f8a1e6d2dda8af0c..c27996f96e7f7ce076fba1579a64c9333d21e1f8 100644 (file)
@@ -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;
        }
 
        /**
index adc1197aa1867967e8382ae6eba8371c3d1f9aad..5af694bb85d18f14ebfd904be8bacf0e4f56f94c 100644 (file)
@@ -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;
        }
 
        /**
index 858e79d44238ef190b08dc73376c2bbf5deb616e..1ca0457adb62b74d70bb30aaa5f441310a3ed4ec 100644 (file)
@@ -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 {
index eedbe39f12a37875c30fbd40e210c9e4dd930da3..cd905760fac9eb44b805fe616e4f73c6b9dc397f 100644 (file)
@@ -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 {
index 7220ff4ef485b5354e2efeb99f888df9e5cec4af..732625980e8740adba93c266a520e0225f53d2a3 100644 (file)
@@ -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 {
index 795b9f7e9f74d5c0a04d0ed5aca5d9962e4afa39..b90eda42bb605cd64856181117a2cd5bc799ec4a 100644 (file)
@@ -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;
        }
 
        /**