You are here

function botcha_uninstall in BOTCHA Spam Prevention 7.2

Same name and namespace in other branches
  1. 6.4 botcha.install \botcha_uninstall()
  2. 6 botcha.install \botcha_uninstall()
  3. 6.2 botcha.install \botcha_uninstall()
  4. 6.3 botcha.install \botcha_uninstall()
  5. 7.4 botcha.install \botcha_uninstall()
  6. 7 botcha.install \botcha_uninstall()
  7. 7.3 botcha.install \botcha_uninstall()

Implements hook_uninstall().

File

./botcha.install, line 237

Code

function botcha_uninstall() {
  db_delete('variable')
    ->condition('name', 'botcha_%', 'LIKE')
    ->execute();
  $i18n_variables = variable_get('i18n_variables', '');
  if (is_array($i18n_variables)) {
    $i18n_variables = array_diff($i18n_variables, _botcha_variables());
    variable_set('i18n_variables', $i18n_variables);
  }

  // Clean the environment.
  Botcha::clean();
  cache_clear_all('variables', 'cache');
}