2008-08-28 Esteban Sanchez <estebans@artica.es>

* include/functions_visual_map.php: Fixed an error when there were no
        elements in the map that cause Javascript failure and nothing works.
        Thanks Jorge for the advice.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1043 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Esteban Sanchez 2008-08-28 08:41:51 +00:00
parent da3575c986
commit a90d0865b5
2 changed files with 95 additions and 91 deletions

View File

@ -1,3 +1,9 @@
2008-08-28 Esteban Sanchez <estebans@artica.es>
* include/functions_visual_map.php: Fixed an error when there were no
elements in the map that cause Javascript failure and nothing works.
Thanks Jorge for the advice.
2008-08-27 Raul Mateos <raulofpandora@gmail.com>
* operation/agentes/status_monitor.php: Moved legend.

View File

@ -24,10 +24,7 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines =
$layout_datas = get_db_all_rows_field_filter ('tlayout_data', 'id_layout', $id_layout);
$lines = array ();
if ($layout_datas === false) {
echo '</div>';
return;
}
if ($layout_datas !== false) {
foreach ($layout_datas as $layout_data) {
// Linked to other layout ?? - Only if not module defined
@ -120,6 +117,7 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines =
array_push ($lines, $line);
}
}
}
if ($draw_lines) {
/* If you want lines in the map, call using Javascript:
draw_lines (lines, id_div);