You are here

function mailsystem_clear in Mail System 7

Same name and namespace in other branches
  1. 8 mailsystem.module \mailsystem_clear()
  2. 8.2 mailsystem.module \mailsystem_clear()
  3. 6.2 mailsystem.module \mailsystem_clear()
  4. 6 mailsystem.module \mailsystem_clear()
  5. 7.3 mailsystem.module \mailsystem_clear()
  6. 7.2 mailsystem.module \mailsystem_clear()

Helps other modules safely remove their settings from mail_system. This function should be called from the other module's hook_disable() function.

Parameters

$setting An associative array ($module => $classname) describing: a module and associated MailSystemInterface class that are being disabled.

  • $module is the machine-readable module name.
  • $classname is a class that implements MailSystemInterface.

If $classname is empty, only the $module entry is removed.

$class: The name of the class to be removed, if any.

File

./mailsystem.module, line 86
Provide UI for controlling the mail_system variable.

Code

function mailsystem_clear(array $setting) {
  variable_set('mail_system', array_merge(mailsystem_defaults(), array_diff_key(array_diff(mailsystem_get(), $setting), $setting)));
}