function _calendar_setup_form_submit in Calendar 5
Same name and namespace in other branches
- 5.2 calendar_admin.inc \_calendar_setup_form_submit()
Save requested values.
1 call to _calendar_setup_form_submit()
- calendar_setup_form_submit in ./
calendar.module - Save Setup values.
File
- ./
calendar_admin.inc, line 295 - This file contains administrative functions used only when setting up the calendar and views_hooks() that are called infrequently and cached. No need to parse all this code the rest of the time.
Code
function _calendar_setup_form_submit($form_id, $form_values) {
$view_name = $form_values['view_name'];
$display_format = array();
variable_set('calendar_empty_arg', check_plain($form_values['calendar_empty_arg']));
foreach ($form_values as $value_name => $value) {
switch ($value_name) {
case 'calendar_time_format':
variable_set('calendar_time_format_' . $view_name, $value);
break;
case 'year':
case 'month':
case 'week':
case 'day':
case 'block':
$display_format[$value_name] = $value;
break;
}
}
variable_set('calendar_display_format_' . $view_name, $display_format);
}