You are here

function mailsystem_admin_save_custom_setting in Mail System 7.3

Helper function. Writes the setting values for a given mail-id.

2 calls to mailsystem_admin_save_custom_setting()
mailsystem_admin_add_setting_submit in ./mailsystem.admin.inc
Form API submit callback: Add an additional custom setting for a module/key.
mailsystem_admin_settings_submit in ./mailsystem.admin.inc
Form API submit callback: save settings.

File

./mailsystem.admin.inc, line 229
Administrative interface for the mail_system variable.

Code

function mailsystem_admin_save_custom_setting($id, $values) {
  if ($values['format'] != $values['mail']) {
    $value = array(
      'mail' => $values['mail'],
      'format' => $values['format'],
    );
  }
  else {
    $value = $values['mail'];
  }
  mailsystem_set(array(
    $id => $value,
  ));
}