function sms_track_settings_form_submit in SMS Framework 6
Same name and namespace in other branches
- 6.2 modules/sms_track/sms_track.admin.inc \sms_track_settings_form_submit()
- 7 modules/sms_track/sms_track.admin.inc \sms_track_settings_form_submit()
File
- modules/
sms_track/ sms_track.admin.inc, line 55 - Message tracking module: Admin settings form functions
Code
function sms_track_settings_form_submit($form, &$form_state) {
$archive_dir_old = variable_get('sms_track_archive_dir', SMS_DIR_NONE);
$archive_dir = $form_state['values']['archive_dir'];
variable_set('sms_track_archive_dir', $archive_dir);
$archive_max_age_days = $form_state['values']['archive_max_age_days'];
variable_set('sms_track_archive_max_age_days', $archive_max_age_days);
// Trigger watchdog messages
if ($archive_dir_old && !$archive_dir) {
watchdog('sms_track', 'SMS Tracking archive collector DISABLED');
}
if (!$archive_dir_old && $archive_dir) {
watchdog('sms_track', 'SMS Tracking archive collector enabled');
}
drupal_set_message('Settings saved.');
}