diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-04-14 13:26:42 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-04-14 13:26:42 +0000 |
| commit | 5348f67b28ed1da2539db6de7a11c605a5dc3a57 (patch) | |
| tree | 4646832d5a7263dbe6818409d9ce9e9dff419008 /frontends/php/overview.php | |
| parent | c44eed92d3f3bcfc0efad6e18e31323f089a9ce6 (diff) | |
| download | zabbix-5348f67b28ed1da2539db6de7a11c605a5dc3a57.tar.gz zabbix-5348f67b28ed1da2539db6de7a11c605a5dc3a57.tar.xz zabbix-5348f67b28ed1da2539db6de7a11c605a5dc3a57.zip | |
- [DEV-142] added transactions to DB actions (beta) (Artem)
- [DEV-137] improvements in permission checks (Artem)
- [DEV-137] changes in schema (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5619 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/overview.php')
| -rw-r--r-- | frontends/php/overview.php | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/frontends/php/overview.php b/frontends/php/overview.php index 95774be9..64cda44b 100644 --- a/frontends/php/overview.php +++ b/frontends/php/overview.php @@ -70,23 +70,24 @@ if(isset($_REQUEST["select"])&&($_REQUEST["select"]!="")) $cmbGroup->AddItem(0,S_ALL_SMALL); if($_REQUEST["type"] == SHOW_TRIGGERS){ - $from = ", functions f, triggers t"; - $where = " and i.itemid=f.itemid and f.triggerid=t.triggerid and t.status=".TRIGGER_STATUS_ENABLED; + $from = ', functions f, triggers t'; + $where = 'and i.itemid=f.itemid and f.triggerid=t.triggerid and t.status='.TRIGGER_STATUS_ENABLED; } else{ $where = $from = ''; } - $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, null, null, get_current_nodeid()). - ") ". - " 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. - $where. - " order by g.name"); - while($row=DBfetch($result)) - { + $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).') '. + ' 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. + $where. + ' ORDER BY g.name'); + while($row=DBfetch($result)){ $cmbGroup->AddItem( $row["groupid"], get_node_name_by_elid($row["groupid"]).$row["name"] |
