You are here

function maillog_disable in Maillog / Mail Developer 6

Same name and namespace in other branches
  1. 7 maillog.install \maillog_disable()

Implementation of hook_disable().

Removing smtp_libraries settings.

If the smptp_library variable refers to the maillog_smtp_library the variable will be resetted. It does not make sense to backup the smtp_library when enabling the maillog module, because before restoring when the maillog module gets disabled another module could changed the smtp variable.

File

./maillog.install, line 59
Provides the installation routines for the maillog module

Code

function maillog_disable() {
  $maillog_smtp_library = drupal_get_path('module', 'maillog') . '/includes/maillog.inc';
  $smtp_library = variable_get('smtp_library', '');

  // reset smtp_library settings.
  if ($smtp_library == $maillog_smtp_library) {
    variable_set('smtp_library', '');
  }

  // reset settings from devel.module
  $devel_old_smtp_library = variable_get('devel_old_smtp_library', '');
  if ($devel_old_smtp_library == $maillog_smtp_library) {
    variable_set('devel_old_smtp_library', '');
  }
  variable_del('maillog_engine');
}