You are here

function apachesolr_search_uninstall in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 apachesolr_search.install \apachesolr_search_uninstall()
  2. 5.2 apachesolr_search.install \apachesolr_search_uninstall()
  3. 6 apachesolr_search.install \apachesolr_search_uninstall()
  4. 6.2 apachesolr_search.install \apachesolr_search_uninstall()
  5. 7 apachesolr_search.install \apachesolr_search_uninstall()

Implements hook_uninstall().

File

./apachesolr_search.install, line 158
Install and related hooks for apachesolr_search.

Code

function apachesolr_search_uninstall() {
  $active = variable_get('search_active_modules', array(
    'node',
    'user',
  ));
  $idx = array_search('apachesolr_search', $active);
  if ($idx !== FALSE) {
    unset($active[$idx]);
    variable_set('search_active_modules', $active);
  }

  // Remove variables.
  variable_del('apachesolr_search_spellcheck');
  variable_del('apachesolr_search_mlt_blocks');
  variable_del('apachesolr_search_default_search_page');

  // Remove blocks.
  db_query('DELETE FROM {blocks} WHERE module = "apachesolr_search"');

  // Remove tables.
  drupal_uninstall_schema('apachesolr_search');
}