function shoutbox_domain_settings_form_submit in Shoutbox 7.2
Same name and namespace in other branches
- 7 shoutbox_domain/shoutbox_domain.module \shoutbox_domain_settings_form_submit()
Custom submit handler for shoutbox_admin_settings.
1 string reference to 'shoutbox_domain_settings_form_submit'
- shoutbox_domain_form_shoutbox_admin_settings_alter in shoutbox_domain/
shoutbox_domain.module - Implements hook_form_FORM_ID_alter().
File
- shoutbox_domain/
shoutbox_domain.module, line 187
Code
function shoutbox_domain_settings_form_submit(&$form, &$form_state) {
$op = $form_state['values']['op'];
$_domain = $form['#domain'];
$_default = $form['#default'];
switch ($op) {
case 'Reset to default domain settings':
foreach ($form_state['values'] as $key => $value) {
if (strpos($key, 'shoutbox_') !== FALSE) {
domain_conf_variable_save($_domain['domain_id'], $key, domain_conf_variable_get($_default['domain_id'], $key));
}
}
break;
case 'Save configuration':
foreach ($form_state['values'] as $key => $value) {
if (strpos($key, 'shoutbox_') !== FALSE) {
domain_conf_variable_save($_domain['domain_id'], $key, $value);
}
}
break;
}
}