You are here

function invoice_uninstall in Invoice 6

Same name and namespace in other branches
  1. 7 invoice.install \invoice_uninstall()

Implementation of hook_uninstall()

File

./invoice.install, line 41

Code

function invoice_uninstall() {
  $result = db_query("SELECT name FROM {variable} WHERE name LIKE 'invoice_%'");
  while ($variable = db_fetch_object($result)) {
    variable_del($variable->name);
  }
  variable_del('node_options_invoice');
  variable_del('pathauto_node_invoice_pattern');
  db_query("DELETE FROM {node} WHERE type='invoice'");

  // Drop all invoice tables
  drupal_uninstall_schema('invoice');
}