You are here

function brazilianids_uninstall in Brazilian IDs 6

Implementation of hook_uninstall().

File

./brazilianids.install, line 21
brazilianids.install Install, uninstall, enable and disable the module

Code

function brazilianids_uninstall() {
  if (module_exists('content')) {
    drupal_load('module', 'content');
    content_notify('uninstall', 'brazilianids');
  }
  db_query("DELETE FROM {variable} WHERE name LIKE 'brazilianids_%%'");

  // Delete all global variables
  variable_del('brazilianids_cpf');
  variable_del('brazilianids_cnpj');
  variable_del('brazilianids_cpfcnpj');
  variable_del('brazilianids_registration');
  variable_del('brazilianids_category');
  variable_del('brazilianids_field_weight');
  variable_del('brazilianids_required');
  variable_del('brazilianids_enable_cpf');
  variable_del('brazilianids_enable_cnpj');
  variable_del('brazilianids_enable_cpfcnpj');
  cache_clear_all('variables', 'cache');
}