function disable_messages_uninstall in Disable Messages 6
Same name and namespace in other branches
- 8 disable_messages.install \disable_messages_uninstall()
- 7 disable_messages.install \disable_messages_uninstall()
- 2.x disable_messages.install \disable_messages_uninstall()
Implementation of hook_uninstall().
File
- ./
disable_messages.install, line 39
Code
function disable_messages_uninstall() {
variable_del('disable_messages_enable');
variable_del('disable_messages_ignore_patterns');
variable_del('disable_messages_ignore_regex');
variable_del('disable_messages_ignore_case');
variable_del('disable_messages_filter_by_page');
variable_del('disable_messages_page_filter_paths');
variable_del('disable_messages_exclude_users');
variable_del('disable_messages_enable_debug');
variable_del('disable_messages_debug_visible_div');
// Access the user module to get permissions admin form.
module_load_include('inc', 'user', 'user.admin');
$form_state = array();
$form_id = 'user_admin_perm';
// Submit the admin user permissions form to clear out the
// permissions added for the disable_messages module.
drupal_rebuild_form($form_id, $form_state, array());
drupal_execute($form_id, $form_state);
}