From 15ec55589c3787299c5cb402068a64e8056ddc4a Mon Sep 17 00:00:00 2001 From: Hirofumi Kosaka Date: Tue, 22 Mar 2016 13:25:15 +0900 Subject: [PATCH] Fixed a bug that custom "interval values" had not been used as default module interval (you can add custom ones at 'visual styles' configuration). --- pandora_console/include/functions_html.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index dc8273f32f..8b2f6d6d56 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -597,7 +597,16 @@ function html_print_extended_select_for_time ($name, $selected = '', $script = ' global $config; $fields = get_periods(); - + + if ( ! $selected ) { + foreach( $fields as $t_key => $t_value){ + if ( $t_key != -1 ) { // -1 means 'custom' + $selected = $t_key; + break; + } + } + } + if (($selected !== false) && (!isset($fields[$selected]) && $selected != 0)) { $fields[$selected] = human_time_description_raw($selected,true); }