You are here

function og_subgroups_uninstall in Subgroups for Organic groups 6

Same name and namespace in other branches
  1. 5.4 og_subgroups.install \og_subgroups_uninstall()
  2. 5 og_subgroups.install \og_subgroups_uninstall()

Implementation of hook_uninstall()

File

./og_subgroups.install, line 43
Installs and updates the necessary tables required by the OG Subgroups module.

Code

function og_subgroups_uninstall() {
  drupal_uninstall_schema('og_subgroups');

  // Remove general variables
  variable_del('og_subgroups_block_use_treeview');
  variable_del('og_subgroups_block_use_treeview_controls');
  variable_del('og_subgroups_block_use_treeview_ajax');
  variable_del('og_subgroups_inherit_privacy');

  // Remove variables for enabled node types
  $vars = db_query("SELECT name FROM {variable} WHERE name LIKE 'og_subgroups_node_type_enabled_%'");
  while ($var = db_fetch_object($vars)) {
    variable_del($var->name);
  }
}