You are here

function apachesolr_search_apachesolr_default_environment in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 apachesolr_search.module \apachesolr_search_apachesolr_default_environment()
  2. 7 apachesolr_search.module \apachesolr_search_apachesolr_default_environment()

Implements hook_apachesolr_default_environment()

Make sure the core search page is using the default environment.

File

./apachesolr_search.module, line 366
Provides a content search implementation for node content for use with the Apache Solr search application.

Code

function apachesolr_search_apachesolr_default_environment($env_id, $old_env_id) {
  $page = apachesolr_search_page_load('core_search');
  if ($page && $page['env_id'] != $env_id) {
    $page['env_id'] = $env_id;
    apachesolr_search_page_save($page);
  }
}