From f1cbe8c360f9b12187414f421c2fc4f3440a8993 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Wed, 9 Aug 2023 12:47:51 +0200 Subject: [PATCH] #11851 Fixed operation of the interval field, allowing to add more than one. --- pandora_console/include/functions_config.php | 6 ++++++ pandora_console/include/functions_html.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 1b871d3c93..6f2643cc52 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -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); } } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index f56639cece..dcf367a54c 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -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