You are here

function quotes_uninstall in Quotes 6

Same name and namespace in other branches
  1. 5 quotes.install \quotes_uninstall()
  2. 7 quotes.install \quotes_uninstall()

Implementation of hook_uninstall().

File

./quotes.install, line 534
Handles installation and updates for the quotes module.

Code

function quotes_uninstall() {
  variable_del('quotes_author_bio');
  variable_del('quotes_author_link');
  variable_del('quotes_block_citation');
  variable_del('quotes_block_view_text');
  variable_del('quotes_block_view_weight');
  variable_del('quotes_leader');
  variable_del('quotes_node_view_link');
  variable_del('quotes_node_view_weight');
  variable_del('quotes_per_page');
  variable_del('quotes_show_myquotes');
  variable_del('quotes_showlink');
  variable_del('quotes_user_recent');
  variable_del('quotes_block_max_length');
  variable_del('quotes_edit_link');
  variable_del('quotes_show_myquotes_original');
  db_query("DELETE FROM {variable} WHERE name LIKE ('quotes_more_%')");

  // Remove all Quotes nodes.
  $result = db_query("SELECT nid FROM {node} WHERE type = 'quotes'");
  while ($obj = db_fetch_object($result)) {
    node_delete($obj->nid);
  }
  drupal_uninstall_schema('quotes');

  // Delete all our blocks.
  db_query("DELETE FROM {blocks} WHERE module='quotes'");

  // Clear the cache.
  cache_clear_all;
}