You are here

function facetapi_luceneapi_uninstall in Facet API 6

Implementation of hook_uninstall().

File

contrib/facetapi_luceneapi/facetapi_luceneapi.install, line 18
Installation functions for the Search Lucene API Facet Adapter module.

Code

function facetapi_luceneapi_uninstall() {
  drupal_uninstall_schema('facetapi_luceneapi');

  // Removed "termfreqs_cached" variable for all fields.
  $variable = 'facetapi:termfreqs_cached:' . $form['storage']['#value']['searcher'] . ':%%';
  if ($result = db_query("SELECT name FROM {variable} WHERE name LIKE '{$variable}'")) {
    while ($record = db_fetch_object($result)) {
      variable_del($record->name);
    }
  }
}