diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index fac9719923..26ba5786c4 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2012-10-04 Juan Manuel Ramon + + * include/functions_html.php: Fixed print_image when source image + doesn't exists on metaconsole then try to search it in normal + console. + 2012-10-04 Ramon Novoa * include/functions_api.php: Fixed a typo. diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 721e392a7d..ab5781a7ac 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1267,8 +1267,16 @@ function html_print_image ($src, $return = false, $options = false, $return_src } + $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 (false === file_get_contents($src,0,null,0,1)) { + $src = ui_get_full_url('../../' . $src_tmp); + } + } + // Only return src field of image if ($return_src) { if (!$return) {