diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index e31946894f..cc993331ec 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -4387,7 +4387,7 @@ function graph_monitor_wheel ($width = 550, $height = 600, $filter = false) { $data_agents[$agent_id]['children'][$module_group_id]['children'][] = $data_module; unset($modules[$module_id]); } - function order_module_group_keys ($value, $key) { + function order_module_group_keys ($value) { $value['children'] = array_merge($value['children']); return $value; } diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index 7e84b167d8..bfc5d3af55 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -1701,7 +1701,7 @@ function groups_get_tree_good (&$groups, $parent = false, &$childs) { if ($parent === false && (!isset($group['parent']) || $group['parent'] == 0 || !in_array($group['parent'], $groups))) { $return[$id] = $group; //unset($groups[$id]); - $children = groups_get_tree_good($groups, $id); + $children = groups_get_tree_good($groups, $id, $noUse); if (!empty($children)) { $return[$id]['children'] = $children; @@ -1713,7 +1713,7 @@ function groups_get_tree_good (&$groups, $parent = false, &$childs) { else if ($parent && isset($group['parent']) && $group['parent'] == $parent) { $return[$id] = $group; //unset($groups[$id]); - $children = groups_get_tree_good($groups, $id); + $children = groups_get_tree_good($groups, $id, $noUse); if (!empty($children)) { $return[$id]['children'] = $children; diff --git a/pandora_console/operation/agentes/networkmap.dinamic.php b/pandora_console/operation/agentes/networkmap.dinamic.php index 3100d03298..9e93ad9cc5 100644 --- a/pandora_console/operation/agentes/networkmap.dinamic.php +++ b/pandora_console/operation/agentes/networkmap.dinamic.php @@ -18,10 +18,11 @@ global $config; check_login (); -if (_id_ != "_id_") { +if (defined('_id_') && _id_ != "_id_") { $id = _id_; } else { + define("_id_", "_id_"); $id = get_parameter('id_networkmap', true); } @@ -36,8 +37,7 @@ if (enterprise_installed()) { $activeTab = $tab; } } - -if (_activeTab_ != "_activeTab_") { +if (defined("_activeTab_") && _activeTab_ != "_activeTab_") { $activeTab = _activeTab_; $tab = $activeTab; } diff --git a/pandora_console/operation/agentes/pandora_networkmap.php b/pandora_console/operation/agentes/pandora_networkmap.php index 922cab8b8f..2f37559b48 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.php +++ b/pandora_console/operation/agentes/pandora_networkmap.php @@ -445,6 +445,7 @@ switch ($tab) { if (enterprise_installed()) { $old_networkmaps_enterprise = db_get_all_rows_sql("SELECT * FROM tnetworkmap_enterprise"); + if ($old_networkmaps_enterprise === false) $old_networkmaps_enterprise = array(); } $old_networkmaps_open = db_get_all_rows_sql("SELECT * FROM tnetwork_map");