2011-08-08 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* 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



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4683 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-08-08 15:41:52 +00:00
parent bf28bad8d4
commit 9da90c31df
4 changed files with 29 additions and 10 deletions

View File

@ -1,3 +1,12 @@
2011-08-08 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* 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 <rnovoa@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v3.2_to_v4.0.sql: Added a

View File

@ -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;

View File

@ -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=<<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD>' . ui_print_moduletype_icon ($module['id_tipo_modulo'], true, true).'</TD></TR>
$node = $module['id_node'].' [ color="'.$status_color.'", fontsize='.$font_size.', style="filled", fixedsize=true, width=0.30, height=0.30, label=<<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD>' . ui_print_moduletype_icon ($module['id_tipo_modulo'], true, true, false). '</TD></TR>
<TR><TD>'.$module['nombre'].'</TD></TR></TABLE>>,
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'].'"];';

View File

@ -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/<img_src>).
* @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);
}
}
/**