From 4cdd6bbde6c0feb841d94ce71a50762949757833 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 11 Jun 2013 10:06:23 +0000 Subject: [PATCH] 2013-06-11 Miguel de Dios * include/functions_html.php: revert my own changes in "html_print_image", the code didn't run fine. * operation/tree.php: fixed the params to call the function. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8285 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/include/functions_html.php | 7 ++++++- pandora_console/operation/tree.php | 8 ++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 153a5b3a00..735d12f6e7 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-06-11 Miguel de Dios + + * include/functions_html.php: revert my own changes in + "html_print_image", the code didn't run fine. + + * operation/tree.php: fixed the params to call the function. + 2013-06-10 Miguel de Dios * include/javascript/jquery.ui-timepicker-addon.js: updated the diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 82f0136b2e..e5eb1d7255 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1639,11 +1639,16 @@ 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); + $src = ui_get_full_url('../../' . $src_tmp); } } else { diff --git a/pandora_console/operation/tree.php b/pandora_console/operation/tree.php index c9f111a257..a020752023 100644 --- a/pandora_console/operation/tree.php +++ b/pandora_console/operation/tree.php @@ -187,8 +187,12 @@ if (is_ajax ()) $agent_info["modules"] = $row["total_count"]; $agent_info["alert_img"] = agents_tree_view_alert_img ($agent_info["monitor_alertsfired"]); - $agent_info["status_img"] = agents_tree_view_status_img ($agent_info["monitor_critical"], $agent_info["monitor_warning"], $agent_info["monitor_unknown"]. - $agent_info["modules"], $agent_info["monitor_notinit"]); + $agent_info["status_img"] = agents_tree_view_status_img( + $agent_info["monitor_critical"], + $agent_info["monitor_warning"], + $agent_info["monitor_unknown"], + $agent_info["modules"], + $agent_info["monitor_notinit"]); // Filter by status (only in policy view) if ($type == 'policies') {