From d9e0592229a5fe1c3945252a3ff7380de38ba498 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 1 Sep 2011 13:09:17 +0000 Subject: [PATCH] 2011-09-01 Miguel de Dios * include/functions_groups.php: fixed when the group haven't a icon. * operation/menu.php: applied the safe_out before the print a piece the name of map in submenu. * operation/gis_maps/render_view.php: fixed the name of agents with white spaces. Fixes: #3398436 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4874 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 12 ++++++++++++ pandora_console/include/functions_groups.php | 8 +++++++- pandora_console/operation/gis_maps/render_view.php | 2 +- pandora_console/operation/menu.php | 4 ++-- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f80601f96f..d8cb23cb34 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,15 @@ +2011-09-01 Miguel de Dios + + * include/functions_groups.php: fixed when the group haven't a icon. + + * operation/menu.php: applied the safe_out before the print a piece the + name of map in submenu. + + * operation/gis_maps/render_view.php: fixed the name of agents with white + spaces. + + Fixes: #3398436 + 2011-09-01 Juan Manuel Ramon * images/groups_small/without_group.bad.png diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index 4a25f27dca..3702db8dc4 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -368,7 +368,13 @@ function groups_get_icon ($id_group) { return 'world'; } else { - return (string) db_get_value ('icon', 'tgrupo', 'id_grupo', (int) $id_group); + $icon = (string) db_get_value ('icon', 'tgrupo', 'id_grupo', (int) $id_group); + + if ($icon == '') { + $icon = 'without_group'; + } + + return $icon; } } diff --git a/pandora_console/operation/gis_maps/render_view.php b/pandora_console/operation/gis_maps/render_view.php index f8bacd6e73..b6dd81046f 100644 --- a/pandora_console/operation/gis_maps/render_view.php +++ b/pandora_console/operation/gis_maps/render_view.php @@ -167,7 +167,7 @@ if ($layers != false) { $status = agents_get_status($idAgent); $parent = db_get_value('id_parent', 'tagente', 'id_agente', $idAgent); - gis_add_agent_point($layer['layer_name'], $agentName, $coords['stored_latitude'], + gis_add_agent_point($layer['layer_name'], io_safe_output($agentName), $coords['stored_latitude'], $coords['stored_longitude'], $icon, 20, 20, $idAgent, $status, 'point_agent_info', $parent); } } diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index ad570f44fa..b5c8ed8ce1 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -82,8 +82,8 @@ if (check_acl ($config['id_user'], 0, "AR")) { if (! check_acl ($config["id_user"], $gisMap["group_id"], "IR")) { continue; } - $sub["operation/gis_maps/render_view&map_id=".$gisMap["id_tgis_map"]]["text"] = mb_substr ($gisMap["map_name"], 0, 15); - $sub["operation/gis_maps/render_view&map_id=".$gisMap["id_tgis_map"]]["title"] = $gisMap["map_name"]; + $sub["operation/gis_maps/render_view&map_id=".$gisMap["id_tgis_map"]]["text"] = mb_substr (io_safe_output($gisMap["map_name"]), 0, 15); + $sub["operation/gis_maps/render_view&map_id=".$gisMap["id_tgis_map"]]["title"] = io_safe_output($gisMap["map_name"]); $sub["operation/gis_maps/render_view&map_id=".$gisMap["id_tgis_map"]]["refr"] = 0; }