You are here

function customerror_uninstall in Customerror 7

Same name and namespace in other branches
  1. 5 customerror.install \customerror_uninstall()
  2. 6 customerror.install \customerror_uninstall()

Implements hook_uninstall().

File

./customerror.install, line 11
Install, update and uninstall functions for the customerror module.

Code

function customerror_uninstall() {
  db_delete('variable')
    ->condition('name', 'customerror_%', 'LIKE')
    ->execute();

  // @todo document, why manually loading .module file.
  module_load_include('module', 'customerror');
  foreach (_customerror_enum_errors() as $code => $desc) {
    if (variable_get('site_' . $code, '') == 'customerror/' . $code) {
      variable_del('site_' . $code, '');
    }
  }
}