#11851 Fixed operation of the interval field, allowing to add more than one.
This commit is contained in:
parent
5a440f1078
commit
f1cbe8c360
|
@ -1489,6 +1489,12 @@ function config_update_config()
|
||||||
$interval_values_array = explode(',', $interval_values);
|
$interval_values_array = explode(',', $interval_values);
|
||||||
if (in_array($new_interval, $interval_values_array) === false) {
|
if (in_array($new_interval, $interval_values_array) === false) {
|
||||||
$interval_values_array[] = $new_interval;
|
$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);
|
$interval_values = implode(',', $interval_values_array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2227,7 +2227,7 @@ function html_print_extended_select_for_time(
|
||||||
$nothing_value,
|
$nothing_value,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
true,
|
||||||
$class,
|
$class,
|
||||||
$readonly,
|
$readonly,
|
||||||
'font-size: xx-small;'.$select_style
|
'font-size: xx-small;'.$select_style
|
||||||
|
|
Loading…
Reference in New Issue