#11851 Fixed operation of the interval field, allowing to add more than one.

This commit is contained in:
Jorge Rincon 2023-08-09 12:47:51 +02:00
parent 5a440f1078
commit f1cbe8c360
2 changed files with 7 additions and 1 deletions

View File

@ -1489,6 +1489,12 @@ function config_update_config()
$interval_values_array = explode(',', $interval_values);
if (in_array($new_interval, $interval_values_array) === false) {
$interval_values_array[] = $new_interval;
// Get current periods.
$current_period = get_periods(false, false, true);
$new_current_period = array_keys($current_period);
$new_current_period = implode(',', $new_current_period);
// Add new periods to current.
array_push($interval_values_array, $new_current_period);
$interval_values = implode(',', $interval_values_array);
}
}

View File

@ -2227,7 +2227,7 @@ function html_print_extended_select_for_time(
$nothing_value,
false,
false,
false,
true,
$class,
$readonly,
'font-size: xx-small;'.$select_style