You are here

function taxonomy_csv_uninstall in Taxonomy CSV import/export 7.5

Same name and namespace in other branches
  1. 6.5 taxonomy_csv.install \taxonomy_csv_uninstall()
  2. 6.2 taxonomy_csv.install \taxonomy_csv_uninstall()
  3. 6.3 taxonomy_csv.install \taxonomy_csv_uninstall()
  4. 6.4 taxonomy_csv.install \taxonomy_csv_uninstall()
  5. 7.4 taxonomy_csv.install \taxonomy_csv_uninstall()

Implements hook_uninstall().

File

./taxonomy_csv.install, line 26
Install, update and uninstall functions for the taxonomy_csv module.

Code

function taxonomy_csv_uninstall() {

  // Simple DB query to get the names of the variables of the module.
  $results = db_select('variable', 'v')
    ->fields('v', array(
    'name',
  ))
    ->condition('name', 'taxonomy_csv_%', 'LIKE')
    ->execute();
  foreach ($results as $result) {
    variable_del($result->name);
  }
  drupal_set_message(st('Taxonomy csv import/export: All user preferences have been removed. Thanks for using this module!<br />
    Your comments are welcomed on <a href="!link">Taxonomy CSV import/export</a> module page.', array(
    '!link' => url('https://drupal.org/project/taxonomy_csv'),
  )));
}