From 75873b02d466f0fccee9c96942dba02c31ce61a5 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 16 Jul 2015 15:12:47 +0200 Subject: [PATCH] Some fixes in the visualmap. --- pandora_console/godmode/reporting/map_builder.php | 5 +++-- pandora_console/include/functions_visual_map.php | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php index 47c098619a..61d13dda52 100644 --- a/pandora_console/godmode/reporting/map_builder.php +++ b/pandora_console/godmode/reporting/map_builder.php @@ -43,7 +43,7 @@ if (!defined('METACONSOLE')) { $id_layout = (int) get_parameter ('id_layout'); $copy_layout = (bool) get_parameter ('copy_layout'); $delete_layout = (bool) get_parameter ('delete_layout'); -$refr = (int) get_parameter('refr'); +$refr = (int) get_parameter('refr', 60); $offset = (int) get_parameter('offset', 0); $pagination = (int) get_parameter ("pagination", $config["block_size"]); @@ -238,7 +238,8 @@ else { if ($own_info['is_admin'] || $vconsoles_read) { $maps = visual_map_get_user_layouts (0,false,$filters); $total_maps = count(visual_map_get_user_layouts()); -} else { +} +else { $maps = visual_map_get_user_layouts ($config['id_user'], false, $filters, false); $total_maps = count(visual_map_get_user_layouts ($config['id_user'], false, diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 4d2fa1c870..95e8b7f4ad 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1894,6 +1894,9 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter $groups = users_get_groups ($id_user, 'RR', false); if (!empty($groups)) { + if (empty($where)) + $where = ""; + if ($where != '') { $where .= ' AND '; }