diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 16a00fbd24..562e40bf40 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2011-07-08 Junichi Satoh + + * include/functions_agents.php: Fixed agents_get_group_agents() + does not work correctly with $childGroups enabled. + 2011-07-07 Sergio Martin * godmode/groups/group_list.php: Added code for get agent filter diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index da5d254783..2daf3cf9f1 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -756,6 +756,14 @@ function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower } if ($childGroups) { + if (is_array($id_group)) { + foreach ($id_group as $parent) { + $id_group = array_merge($id_group, groups_get_id_recursive($parent, true)); + } + } + else { + $id_group = groups_get_id_recursive($id_group, true); + } $id_group = array_keys(users_get_groups(false, "AR", true, false, (array)$id_group)); }