You are here

function nodeaccess_uninstall in Nodeaccess 5

Same name and namespace in other branches
  1. 6.2 nodeaccess.install \nodeaccess_uninstall()
  2. 6 nodeaccess.install \nodeaccess_uninstall()
  3. 7 nodeaccess.install \nodeaccess_uninstall()

Implementation of hook_uninstall().

File

./nodeaccess.install, line 165

Code

function nodeaccess_uninstall() {

  // Remove variables.
  variable_del('nodeaccess-priority');
  variable_del('nodeaccess-preserve');
  variable_del('nodeaccess-grants');
  variable_del('nodeaccess-roles');
  variable_del('nodeaccess-types');
  variable_del('nodeaccess_authors');
  foreach (node_get_types() as $type => $name) {
    variable_del('nodeaccess_' . $type);
  }

  // Remove tables.
  db_query("DROP TABLE {nodeaccess}");
  db_query("DROP TABLE {nodeaccess_role_alias}");
}