You are here

function apachesolr_search_apachesolr_environment_delete in Apache Solr Search 6.3

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

Implements hook_apachesolr_environment_delete().

File

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

Code

function apachesolr_search_apachesolr_environment_delete($server) {
  if (db_table_exists('apachesolr_search_page')) {
    $query = "UPDATE {apachesolr_search_page} SET env_id = '' WHERE env_id = '%s'";
    db_query($query, array(
      $server['env_id'],
    ));
    apachesolr_environment_variable_del($server['env_id'], 'apachesolr_search_show_facets');
    apachesolr_environment_variable_del($server['env_id'], 'apachesolr_search_facet_pages');
    menu_rebuild();
  }
}