diff options
Diffstat (limited to 'frontends/php/overview.php')
-rw-r--r-- | frontends/php/overview.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/frontends/php/overview.php b/frontends/php/overview.php index 0ff603cb..c3d8f2a2 100644 --- a/frontends/php/overview.php +++ b/frontends/php/overview.php @@ -97,9 +97,11 @@ if(isset($_REQUEST['select']) && ($_REQUEST['select']!='')){ $where = $from = ''; } + $available_groups = get_accessible_groups_by_user($USER_DETAILS,PERM_READ_LIST); + $result=DBselect('SELECT DISTINCT g.groupid,g.name '. ' FROM groups g, hosts_groups hg, hosts h, items i'.$from. - ' WHERE g.groupid IN ('.get_accessible_groups_by_user($USER_DETAILS,PERM_READ_LIST).') '. + ' WHERE '.DBcondition('g.groupid',$available_groups). ' AND hg.groupid=g.groupid '. ' AND h.status='.HOST_STATUS_MONITORED. ' AND h.hostid=i.hostid '. |