You are here

function taxonomy_menu_uninstall in Taxonomy menu 6.2

Same name and namespace in other branches
  1. 8 taxonomy_menu.install \taxonomy_menu_uninstall()
  2. 5 taxonomy_menu.install \taxonomy_menu_uninstall()
  3. 6.3 taxonomy_menu.install \taxonomy_menu_uninstall()
  4. 6 taxonomy_menu.install \taxonomy_menu_uninstall()
  5. 7.2 taxonomy_menu.install \taxonomy_menu_uninstall()
  6. 7 taxonomy_menu.install \taxonomy_menu_uninstall()

Implementation of hook_uninstall().

File

./taxonomy_menu.install, line 11
Install and uninstall all required databases. Incremental database updates.

Code

function taxonomy_menu_uninstall() {

  // remove menu items
  db_query("DELETE FROM {menu_links} WHERE module = '%s'", 'taxonomy_menu');

  // rebuild the menus
  variable_set('menu_rebuild_needed', TRUE);

  // Delete variables
  $variables = db_query('SELECT * from {variable}');
  while ($variable = db_fetch_object($variables)) {
    if (strpos($variable->name, 'taxonomy_menu') !== FALSE) {
      variable_del($variable->name);
    }
  }

  // remove table
  drupal_uninstall_schema('taxonomy_menu');
}