From 7fc47883532f0c385d8bcfbdb82a0e2cd9e100c6 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Thu, 10 Aug 2023 13:08:12 +0200 Subject: [PATCH] #11851 Fixed weird interval --- pandora_console/include/functions_config.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 6f2643cc52..c522cdee92 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1491,10 +1491,13 @@ function config_update_config() $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); + if (!isset($current_period[-1])) { + $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); } }