Merge pull request #22120 from nextcloud/fix/search/ids-and-order

Fix search providers order and IDs
pull/22137/head
Morris Jobke 6 years ago committed by GitHub
commit 588b6fa35e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      apps/dav/lib/Search/ContactsSearchProvider.php
  2. 4
      apps/dav/lib/Search/EventsSearchProvider.php
  3. 4
      apps/dav/lib/Search/TasksSearchProvider.php
  4. 2
      apps/dav/tests/unit/Search/ContactsSearchProviderTest.php
  5. 2
      apps/dav/tests/unit/Search/EventsSearchProviderTest.php
  6. 2
      apps/dav/tests/unit/Search/TasksSearchProviderTest.php
  7. 5
      apps/settings/lib/Search/SectionSearch.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;
}
/**

@ -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;
}
/**

@ -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;
}
/**

@ -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 {

@ -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 {

@ -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 {

@ -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;
}
/**

Loading…
Cancel
Save