diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a061d990c9..fd77d86f0a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2011-08-08 Juan Manuel Ramon + + * include/functions_html.php + include/functions_networkmap.php + include/functions_ui.php: Fixes warnings in apache log due to wrong + parameters on graphviz node definitions. + + Fixes: #3375357 + 2011-08-08 Ramon Novoa * pandoradb.sql, extras/pandoradb_migrate_v3.2_to_v4.0.sql: Added a diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 79835c99c3..3b939de5a6 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1206,15 +1206,18 @@ function html_print_image ($src, $return = false, $options = false, $return_src if (!isset ($options["alt"]) && isset ($options["title"])) { $options["alt"] = io_safe_input_html($options["title"]); //Set alt to title if it's not set - } elseif (!isset ($options["alt"])) { - $options["alt"] = ""; - } + }// elseif (!isset ($options["alt"])) { + // $options["alt"] = ""; + //} if (!empty ($style)) { $output .= 'style="'.$style.'" '; } - - $output .= 'alt="'.io_safe_input_html ($options['alt']).'" />'; + + if (isset($options["alt"])) + $output .= 'alt="'.io_safe_input_html ($options['alt']).'" />'; + else + $output .= '/>'; if (!$return) { echo $output; diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index 927dfefb8e..d265e48652 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -460,7 +460,7 @@ function networkmap_create_module_node ($module, $simple = 0, $font_size = 10) { if ($simple == 0){ - $node = $module['id_node'].' [ color="'.$status_color.'", fontsize='.$font_size.', style="filled", fixedsize=true, width=0.30, height=0.30, label=< + $node = $module['id_node'].' [ color="'.$status_color.'", fontsize='.$font_size.', style="filled", fixedsize=true, width=0.30, height=0.30, label=<
' . ui_print_moduletype_icon ($module['id_tipo_modulo'], true, true).'
' . ui_print_moduletype_icon ($module['id_tipo_modulo'], true, true, false). '
'.$module['nombre'].'
>, shape="circle", URL="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$module['id_agente'].'", tooltip="ajax.php?page=operation/agentes/ver_agente&get_agentmodule_status_tooltip=1&id_module='.$module['id_agente_modulo'].'"];'; diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 10c369446f..e0277638e4 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1291,10 +1291,11 @@ function ui_debug ($var, $backtrace = true) { * @param int Module Type ID * @param bool Whether to return or print * @param bool $relative Whether to use relative path to image or not (i.e. $relative= true : /pandora/). + * @param bool $options Whether to use image options like style, border or title on the icon. * * @return string An HTML string with the icon. Printed if return is false */ -function ui_print_moduletype_icon ($id_moduletype, $return = false, $relative = false) { +function ui_print_moduletype_icon ($id_moduletype, $return = false, $relative = false, $options = true) { global $config; $type = db_get_row ("ttipo_modulo", "id_tipo", (int) $id_moduletype, array ("descripcion", "icon")); @@ -1307,9 +1308,15 @@ function ui_print_moduletype_icon ($id_moduletype, $return = false, $relative = if (! file_exists ($config['homedir'].'/'.$imagepath)) $imagepath = ENTERPRISE_DIR.'/'.$imagepath; - return html_print_image ($imagepath, $return, - array ("border" => 0, - "title" => $type["descripcion"]), false, $relative); + if ($options){ + return html_print_image ($imagepath, $return, + array ("border" => 0, + "title" => $type["descripcion"]), false, $relative); + } + else{ + return html_print_image ($imagepath, $return, + false, false, $relative); + } } /**