diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 779ffac1f9..403be6b687 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2013-11-13 Miguel de Dios + + * include/functions_html.php: fixed the checks for duplicate images + in the function "html_print_image" into the metaconsole + installations. + 2013-11-13 Miguel de Dios * operation/visual_console/render_view.php, diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index ec6449e153..a07c2a3206 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1639,22 +1639,30 @@ function html_print_image ($src, $return = false, $options = false, $return_src } - if (!$relative) { - $src_tmp = $src; - $src = ui_get_full_url($src); - } // If metaconsole is activated and image doesn't exists try to search on normal console + if (defined('METACONSOLE')) { if (!$relative) { - if (false === @file_get_contents($src, 0, null, 0, 1)) { - $src = ui_get_full_url('../../' . $src_tmp); + if (!is_readable("enterprise/meta/" . $src)) { + $src = ui_get_full_url('../../' . $src); + html_debug_print($src, true); + } + else { + html_debug_print("###### " . $src, true); } } else { $src = '../../' . $src; } } + else { + if (!$relative) { + $src_tmp = $src; + $src = ui_get_full_url($src); + } + } + // Only return src field of image if ($return_src) {