From 729fe74758033e78dbc0bef44e290a596b9774f4 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 10 Sep 2018 12:08:38 +0200 Subject: [PATCH] fixed minor error tree view acl --- pandora_console/include/class/Tree.class.php | 2 +- pandora_console/include/functions_groupview.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index a450c53c4e..bfad143ff0 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -278,7 +278,7 @@ class Tree { : " AND $filter "; } - static function getGroupAclCondition() { + public function getGroupAclCondition() { if (users_can_manage_group_all("AR")) return ""; $groups_str= implode(",", $this->userGroupsArray); diff --git a/pandora_console/include/functions_groupview.php b/pandora_console/include/functions_groupview.php index fcca629b77..4f86497563 100644 --- a/pandora_console/include/functions_groupview.php +++ b/pandora_console/include/functions_groupview.php @@ -87,9 +87,9 @@ function groupview_get_modules_counters($groups_ids = false) { return db_get_all_rows_sql($sql); } -function groupview_get_all_counters() { +function groupview_get_all_counters($tree_group) { $all_name = __("All"); - $group_acl = Tree::getGroupAclCondition(); + $group_acl = $tree_group->getGroupAclCondition(); $table = is_metaconsole() ? 'tmetaconsole_agent' : 'tagente'; $table_sec = is_metaconsole() ? 'tmetaconsole_agent_secondary_group' @@ -180,7 +180,7 @@ function groupview_get_groups_list($id_user = false, $access = 'AR', $is_not_pag $list[$id_group]['_monitors_alerts_fired_'] = (int)$modules_counters[$id_group]['total_module_alerts']; } - array_unshift($list, groupview_get_all_counters()); + array_unshift($list, groupview_get_all_counters($tree_group)); return array( 'groups' => $list, 'counter' => $counter