You are here

function facetapi_uninstall in Facet API 7

Same name and namespace in other branches
  1. 6.3 facetapi.install \facetapi_uninstall()
  2. 6 facetapi.install \facetapi_uninstall()
  3. 7.2 facetapi.install \facetapi_uninstall()

Implementation of hook_uninstall().

File

./facetapi.install, line 90
Install, update, and uninstall functions for the Facet API module.

Code

function facetapi_uninstall() {

  // Remove all variables that start with "facetapi:".
  $args = array(
    ':module' => 'facetapi%',
  );
  $result = db_query('SELECT name FROM {variable} WHERE name LIKE :module', $args);
  foreach ($result as $record) {
    variable_del($record->name);
  }

  // Remove blocks.
  if (db_table_exists('block')) {
    db_delete('block')
      ->condition('module', 'facetapi')
      ->execute();
  }
}