You are here

function forum_access_uninstall in Forum Access 6

Same name and namespace in other branches
  1. 5 forum_access.install \forum_access_uninstall()
  2. 7 forum_access.install \forum_access_uninstall()

File

./forum_access.install, line 138
Install, update and uninstall functions for the forum_access module.

Code

function forum_access_uninstall() {

  // Remove moderator role.
  if ($moderator_rid = variable_get('forum_access_moderator_rid', 0)) {
    db_query('DELETE FROM {role} WHERE rid = %d', $moderator_rid);
    db_query('DELETE FROM {permission} WHERE rid = %d', $moderator_rid);
    db_query('DELETE FROM {users_roles} WHERE rid = %d', $moderator_rid);
  }
  drupal_uninstall_schema('forum_access');
  variable_del('forum_access_allowed_node_edit_elements');
  variable_del('forum_access_allowed_node_edit_options');
  variable_del('forum_access_batch_threshold');
  variable_del('forum_access_D5_legacy_mode');
  variable_del('forum_access_default_template_tid');
  variable_del('forum_access_moderator_rid');
  variable_del('forum_access_new_template_tid');
  variable_del('forum_access_provide_moderators_template_variable');
  variable_del('forum_access_rids');
}