summaryrefslogtreecommitdiffstats
path: root/frontends/php/events.php
diff options
context:
space:
mode:
authoralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-14 14:44:31 +0000
committeralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-14 14:44:31 +0000
commit12954b5a24cefef20fbd774b49b47533ff9c1c38 (patch)
tree2757944ae0853425ca3ef7ee118a4eb5119819df /frontends/php/events.php
parent7928378e93404fcd315522128f47c54660a74c39 (diff)
downloadzabbix-12954b5a24cefef20fbd774b49b47533ff9c1c38.tar.gz
zabbix-12954b5a24cefef20fbd774b49b47533ff9c1c38.tar.xz
zabbix-12954b5a24cefef20fbd774b49b47533ff9c1c38.zip
- [ZBX-114] fixed permissions for history of events (Alexei)
[svn merge -r5031:5037 svn://svn.zabbix.com/branches/1.4] git-svn-id: svn://svn.zabbix.com/trunk@5038 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/events.php')
-rw-r--r--frontends/php/events.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/frontends/php/events.php b/frontends/php/events.php
index e3766107..1c551cdd 100644
--- a/frontends/php/events.php
+++ b/frontends/php/events.php
@@ -99,14 +99,14 @@ include_once "include/page_header.php";
$cmbGroup->AddItem(0,S_ALL_SMALL);
+ $availiable_groups= get_accessible_groups_by_user($USER_DETAILS,PERM_READ_LIST, null, null, get_current_nodeid());
$availiable_hosts = get_accessible_hosts_by_user($USER_DETAILS, PERM_READ_LIST, null, null, get_current_nodeid());
- $result=DBselect('SELECT DISTINCT g.groupid,g.name '.
- ' FROM groups g, hosts_groups hg, hosts h, items i '.
- ' WHERE h.hostid in ('.$availiable_hosts.') '.
- ' AND hg.groupid=g.groupid AND h.status='.HOST_STATUS_MONITORED.
- ' AND h.hostid=i.hostid AND hg.hostid=h.hostid '.
- ' ORDER BY g.name');
+ $result=DBselect("select distinct g.groupid,g.name from groups g, hosts_groups hg, hosts h, items i ".
+ " where g.groupid in (".$availiable_groups.") ".
+ " and hg.groupid=g.groupid and h.status=".HOST_STATUS_MONITORED.
+ " and h.hostid=i.hostid and hg.hostid=h.hostid and i.status=".ITEM_STATUS_ACTIVE.
+ " order by g.name");
while($row=DBfetch($result))
{