You are here

function google_appliance_theme_registry_alter in Google Search Appliance 6.2

Implementation of hook_theme_registry_alter().

File

./google_appliance.module, line 391
Google Search Appliance (GSA) / Google Mini integration

Code

function google_appliance_theme_registry_alter(&$theme_registry) {

  // If the search.module is disabled, and there is a template
  // over-ride in the theme directory, then the theme registry
  // will have replaced the original 'path' (needed for the include
  // file) with the theme directory (for the template file), the
  // 'file' will have been removed, and the default search.pages.inc
  // include file will consequently not be included.
  // However, we can safely restore them both here, and the template
  // will still be found.
  $search_module_disabled = !array_key_exists('search', module_list());
  if ($search_module_disabled) {
    $theme_registry['search_result']['path'] = 'modules/search';
    $theme_registry['search_result']['file'] = 'search.pages.inc';
    $theme_registry['search_results']['path'] = 'modules/search';
    $theme_registry['search_results']['file'] = 'search.pages.inc';
  }
}