From 4b3b4f0ea8a4b6fd070d0ff39585ff33ad1499a0 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 14 Nov 2013 13:59:38 +0000 Subject: [PATCH] 2013-11-14 Miguel de Dios * include/functions_html.php: fixed the images of metaconsole, again. * include/functions_visual_map_editor.php: fixed the disabled agents only show their modules when it is selected in the editor. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9079 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ pandora_console/include/functions_html.php | 20 ++++++++++++++----- .../include/functions_visual_map_editor.php | 2 ++ 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index fd1f7640f9..52b49d66e7 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2013-11-14 Miguel de Dios + + * include/functions_html.php: fixed the images of metaconsole, + again. + + * include/functions_visual_map_editor.php: fixed the disabled + agents only show their modules when it is selected in the editor. + 2013-11-14 Sergio Martin * godmode/agentes/module_manager_editor_common.php: Change diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index a07c2a3206..001f8fcac9 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1644,12 +1644,22 @@ function html_print_image ($src, $return = false, $options = false, $return_src if (defined('METACONSOLE')) { if (!$relative) { - if (!is_readable("enterprise/meta/" . $src)) { - $src = ui_get_full_url('../../' . $src); - html_debug_print($src, true); + if (strstr(getcwd(), 'enterprise/meta') === false) { + if ($src[0] !== '/') { + $src = '/' . $src; + } + + if (!is_readable(getcwd() . '/enterprise/meta' . $src)) { + $src = ui_get_full_url('../..' . $src); + } + else { + $src = ui_get_full_url($src); + } } else { - html_debug_print("###### " . $src, true); + if (!is_readable($src)) { + $src = ui_get_full_url('../../' . $src); + } } } else { @@ -1662,7 +1672,7 @@ function html_print_image ($src, $return = false, $options = false, $return_src $src = ui_get_full_url($src); } } - + // Only return src field of image if ($return_src) { diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index 77318afac2..54c3b5a7ff 100644 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -123,6 +123,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $params['size'] = 30; $params['selectbox_id'] = 'module'; $params['javascript_is_function_select'] = true; + $params['use_hidden_input_idagent'] = true; + $params['print_hidden_input_idagent'] = true; if (defined('METACONSOLE')) { $params['javascript_ajax_page'] = '../../ajax.php'; $params['disabled_javascript_on_blur_function'] = true;