You are here

function forward_uninstall in Forward 7

Same name and namespace in other branches
  1. 8.3 forward.install \forward_uninstall()
  2. 8 forward.install \forward_uninstall()
  3. 8.2 forward.install \forward_uninstall()
  4. 5 forward.install \forward_uninstall()
  5. 6 forward.install \forward_uninstall()
  6. 7.3 forward.install \forward_uninstall()
  7. 7.2 forward.install \forward_uninstall()
  8. 4.x forward.install \forward_uninstall()
  9. 4.0.x forward.install \forward_uninstall()

Implements hook_uninstall(). ().

File

./forward.install, line 28
Install, update and uninstall functions for the forward module.

Code

function forward_uninstall() {

  // TODO The drupal_(un)install_schema functions are called automatically in D7.;
  // drupal_uninstall_schema('forward');
  // Get global variable array
  global $conf;
  foreach (array_keys($conf) as $key) {

    // Find variables that have the module prefix
    if (strpos($key, 'forward_') === 0) {
      variable_del($key);
    }
  }
  $mail_systems = variable_get('mail_system', array(
    'default-system' => 'DefaultMailSystem',
  ));
  unset($mail_systems['forward']);
  variable_set('mail_system', $mail_systems);
}