You are here

function recipe_uninstall in Recipe 6

Same name and namespace in other branches
  1. 5 recipe.install \recipe_uninstall()
  2. 7.2 recipe.install \recipe_uninstall()
  3. 7 recipe.install \recipe_uninstall()

Implementation of hook_uninstall().

File

./recipe.install, line 250
Install, update and uninstall functions for the recipe module.

Code

function recipe_uninstall() {

  // remove db tables
  drupal_uninstall_schema('recipe');

  // remove node revisions
  db_query("DELETE FROM {node_revisions} WHERE nid in (select nid from {node} WHERE type='%s')", 'recipe');

  // remove recipe nodes
  db_query("DELETE FROM {node} WHERE type = '%s'", 'recipe');

  // remove variables
  db_query("DELETE FROM {variable} WHERE name like '%s%%'", 'recipe_');
}