You are here

function quotes_uninstall in Quotes 5

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

Implementation of hook_uninstall().

File

./quotes.install, line 113
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');
  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);
  }
  db_query('DROP TABLE {quotes}');
  db_query('DROP TABLE {quotes_blocks}');
  db_query('DROP TABLE {quotes_authors}');
  db_query("DELETE FROM {blocks} WHERE module='quotes'");
  if ($_GLOBALS['db_type'] == 'pgsql') {
    db_query('DROP SEQUENCE {quotes}_bid_seq');
  }
}