function statspro_overview_settings_form_submit in Statistics Pro 6.2
Implementation of hook_modulename_submit() for settings form.
File
- ./
statspro_overview.inc, line 80
Code
function statspro_overview_settings_form_submit($form, &$form_state) {
$op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';
if ($op == t('Reset to defaults')) {
unset($_SESSION['statspro_period_overview']);
unset($_SESSION['statspro_custom_number_days_overview']);
drupal_set_message(t('The configuration options have been reset to their default values.'));
}
else {
$_SESSION['statspro_period_overview'] = $form_state['values']['statspro_period'];
if ($form_state['values']['statspro_period'] == 'custom_days') {
$_SESSION['statspro_custom_number_days_overview'] = $form_state['values']['statspro_custom_number_days'];
}
drupal_set_message(t('The configuration options have been saved.'));
}
}