From 2f8e8703b7c2ea898a510e231111d6576a9efeb3 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 14 Aug 2017 14:53:56 +0200 Subject: [PATCH] Fixed --- .../include/functions_visual_map.php | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 3ea05cc8b1..8fa2492fc3 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1531,32 +1531,22 @@ function visual_map_print_item($mode = "read", $layoutData, } } - //$io_safe_output_text = str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text); - - - if(get_parameter('action') == 'edit'){ - //html_debug($layoutData); - //echo 'Data value'; - if( (strip_tags($io_safe_output_text) != '_VALUE_') || (strip_tags($io_safe_output_text) != '(_VALUE_)') ){ + if( (strip_tags($io_safe_output_text) != '_VALUE_') || (strip_tags($io_safe_output_text) != '(_VALUE_)') ) { echo $io_safe_output_text; } - else{ + else { echo ""; } - + } else { + if(strrpos(strip_tags($io_safe_output_text),'(_VALUE_)') !== false || (strip_tags($io_safe_output_text) == '(_VALUE_)')) { + echo str_replace(array("(_VALUE_)","(_value_)"), $value, $io_safe_output_text); } - else{ - if(strip_tags($io_safe_output_text) == '_VALUE_'){ + elseif(strrpos(strip_tags($io_safe_output_text),'_VALUE_') !== false || (strip_tags($io_safe_output_text) == '_VALUE_')) { echo str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text); - } - elseif(strip_tags($io_safe_output_text) == '(_VALUE_)'){ - echo str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text); - } - else{ + } else { echo str_replace('>', ' style="width:'.$layoutData['width'].'px">',$value); } - } //Restore db connection