diff --git a/core/modules/search/lib/Drupal/search/Form/SearchSettingsForm.php b/core/modules/search/lib/Drupal/search/Form/SearchSettingsForm.php index ca89535..ff7672b 100644 --- a/core/modules/search/lib/Drupal/search/Form/SearchSettingsForm.php +++ b/core/modules/search/lib/Drupal/search/Form/SearchSettingsForm.php @@ -56,9 +56,13 @@ public function getFormID() { } /** - * Helper function to get real module names. + * Returns names of available search modules. + * + * @return array + * An array of the names of enabled modules that call hook_search_info + * sorted into alphabetical order. */ - private function SearchGetModuleNames() { + protected function SearchGetModuleNames() { $search_info = search_get_info(TRUE); $names = system_get_module_info('name'); $names = array_intersect_key($names, $search_info); @@ -81,7 +85,7 @@ public function buildForm(array $form, array &$form_state) { } } - module_load_include('inc', 'search', 'search.admin'); + $this->moduleHandler->loadAllIncludes('search'); $count = format_plural($remaining, 'There is 1 item left to index.', 'There are @count items left to index.'); $percentage = ((int)min(100, 100 * ($total - $remaining) / max(1, $total))) . '%'; $status = '

' . t('%percentage of the site has been indexed.', array('%percentage' => $percentage)) . ' ' . $count . '

'; diff --git a/core/modules/search/search.module b/core/modules/search/search.module index 4345b98..61ecacb 100644 --- a/core/modules/search/search.module +++ b/core/modules/search/search.module @@ -157,10 +157,8 @@ function search_menu() { $items['admin/config/search/settings'] = array( 'title' => 'Search settings', 'description' => 'Configure relevance settings for search and other indexing options.', - 'page callback' => 'NOT_USED', - 'access arguments' => array('administer search'), + 'route' => 'search_settings', 'weight' => -10, - 'file' => 'search.admin.inc', ); $items['admin/config/search/settings/reindex'] = array( 'title' => 'Clear index',