From 904ab2ba526e24bb2186ecf95512d3309e741e9a Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 14 Nov 2016 10:52:37 +0100 Subject: [PATCH] Fixed problems with post process select in updated module form. Ticket: #4182 (cherry picked from commit 789fde7eb140c136d05168200b59b2a46af76cec) --- pandora_console/include/functions_html.php | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 36cd5b9ee3..627bba0ea0 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -612,18 +612,12 @@ function html_print_extended_select_for_post_process($name, $selected = '', $fields = post_process_get_custom_values(); $selected_float = (float)$selected; $found = false; - foreach ($fields as $value => $text) { - $value = (float)$value; - - - - if ($value == $selected_float) { - $found = true; - break; - } - } + + if (array_key_exists($selected, $fields)) + $found = true; + if (!$found) { - $fields[floatval($selected)] = floatval($selected); + $fields[$selected] = floatval($selected); } @@ -634,9 +628,6 @@ function html_print_extended_select_for_post_process($name, $selected = '', $uniq_name = $name; } - - - ob_start(); echo '
';