summaryrefslogtreecommitdiffstats
path: root/frontends/php/popup.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-04-10 13:21:21 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-04-10 13:21:21 +0000
commit0269016f320f2fe9ad4d1a4d44ba60610bec9db9 (patch)
tree0fec986a8fdb77d90bc5d4c435e8e45e438b5afd /frontends/php/popup.php
parentba02f0a0e1eb2319b65cf2cba61ae68c92340942 (diff)
downloadzabbix-0269016f320f2fe9ad4d1a4d44ba60610bec9db9.tar.gz
zabbix-0269016f320f2fe9ad4d1a4d44ba60610bec9db9.tar.xz
zabbix-0269016f320f2fe9ad4d1a4d44ba60610bec9db9.zip
- fixed permissions of host groups for popup selector
git-svn-id: svn://svn.zabbix.com/trunk@3987 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/popup.php')
-rw-r--r--frontends/php/popup.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/frontends/php/popup.php b/frontends/php/popup.php
index 033d7781..5d34b05f 100644
--- a/frontends/php/popup.php
+++ b/frontends/php/popup.php
@@ -458,12 +458,14 @@ include_once "include/page_header.php";
}
elseif(in_array($srctbl,array("host_group")))
{
+ $accessible_groups = get_accessible_groups_by_user($USER_DETAILS,PERM_READ_ONLY);
+
$table = new CTableInfo(S_NO_GROUPS_DEFINED);
$table->SetHeader(array(S_NAME));
- $db_groups = DBselect("select distinct g.groupid,g.name from groups g, hosts_groups hg ".
- " where ".DBid2nodeid("g.groupid")."=".$nodeid.
- " and g.groupid=hg.groupid and hg.hostid in (".$accessible_hosts.") ".
+ $db_groups = DBselect("select distinct groupid,name from groups ".
+ " where ".DBid2nodeid("groupid")."=".$nodeid.
+ " and groupid in (".$accessible_groups.") ".
" order by name");
while($row = DBfetch($db_groups))
{