diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-04-17 15:02:02 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-04-17 15:02:02 +0000 |
commit | b82812f00576369e65c996ef51264de66ce63d57 (patch) | |
tree | a3ba8c407e03edd1905f591aa2d14bf32acc4f9b /frontends/php/triggers.php | |
parent | cd6be85dfcfccb202f2d2a9ca9db062725e45d5c (diff) | |
download | zabbix-b82812f00576369e65c996ef51264de66ce63d57.tar.gz zabbix-b82812f00576369e65c996ef51264de66ce63d57.tar.xz zabbix-b82812f00576369e65c996ef51264de66ce63d57.zip |
- [DEV-137] fixes in graph zoom for KQ (Artem)
- [DEV-137] fixes for possible errors under Oracle (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5632 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/triggers.php')
-rw-r--r-- | frontends/php/triggers.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/frontends/php/triggers.php b/frontends/php/triggers.php index 2139840f..e636430c 100644 --- a/frontends/php/triggers.php +++ b/frontends/php/triggers.php @@ -96,7 +96,7 @@ include_once "include/page_header.php"; <?php update_profile("web.triggers.showdisabled",$showdisabled); - $accessible_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_WRITE); + $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_WRITE,PERM_RES_IDS_ARRAY); /* FORM ACTIONS */ if(isset($_REQUEST["clone"]) && isset($_REQUEST["triggerid"])){ @@ -232,7 +232,7 @@ include_once "include/page_header.php"; else if(isset($_REQUEST["group_enable"])&&isset($_REQUEST["g_triggerid"])){ foreach($_REQUEST["g_triggerid"] as $triggerid){ - if(!check_right_on_trigger_by_triggerid(null, $triggerid, $accessible_hosts)) continue; + if(!check_right_on_trigger_by_triggerid(null, $triggerid)) continue; $result=DBselect("SELECT triggerid FROM triggers t WHERE t.triggerid=".zbx_dbstr($triggerid)); if(!($row = DBfetch($result))) continue; @@ -254,7 +254,7 @@ include_once "include/page_header.php"; } else if(isset($_REQUEST["group_disable"])&&isset($_REQUEST["g_triggerid"])){ foreach($_REQUEST["g_triggerid"] as $triggerid){ - if(!check_right_on_trigger_by_triggerid(null, $triggerid, $accessible_hosts)) continue; + if(!check_right_on_trigger_by_triggerid(null, $triggerid)) continue; $result=DBselect("SELECT triggerid FROM triggers t WHERE t.triggerid=".zbx_dbstr($triggerid)); if(!($row = DBfetch($result))) continue; @@ -274,7 +274,7 @@ include_once "include/page_header.php"; else if(isset($_REQUEST["group_delete"])&&isset($_REQUEST["g_triggerid"])){ foreach($_REQUEST["g_triggerid"] as $triggerid){ - if(!check_right_on_trigger_by_triggerid(null, $triggerid, $accessible_hosts)) continue; + if(!check_right_on_trigger_by_triggerid(null, $triggerid)) continue; $result=DBselect("SELECT triggerid,templateid FROM triggers t WHERE t.triggerid=".zbx_dbstr($triggerid)); if(!($row = DBfetch($result))) continue; @@ -313,7 +313,7 @@ include_once "include/page_header.php"; $result=DBselect('SELECT DISTINCT g.groupid,g.name '. ' FROM groups g, hosts_groups hg, hosts h, items i '. - ' WHERE h.hostid in ('.$accessible_hosts.') '. + ' WHERE '.DBcondition('h.hostid',$available_hosts). ' AND hg.groupid=g.groupid '. ' AND h.hostid=i.hostid '. ' AND hg.hostid=h.hostid '. @@ -329,7 +329,7 @@ include_once "include/page_header.php"; ' WHERE h.hostid=i.hostid '. ' AND hg.groupid='.$_REQUEST['groupid']. ' AND hg.hostid=h.hostid'. - ' AND h.hostid in ('.$accessible_hosts.') '. + ' AND '.DBcondition('h.hostid',$available_hosts). ' GROUP BY h.hostid,h.host '. ' ORDER BY h.host'; } @@ -338,7 +338,7 @@ include_once "include/page_header.php"; $sql='SELECT h.hostid,h.host '. ' FROM hosts h,items i '. ' WHERE h.hostid=i.hostid '. - ' AND h.hostid in ('.$accessible_hosts.') '. + ' AND '.DBcondition('h.hostid',$available_hosts). ' GROUP BY h.hostid,h.host '. ' ORDER BY h.host'; } @@ -401,7 +401,7 @@ include_once "include/page_header.php"; $result=DBselect($sql); while($row=DBfetch($result)){ - if(!check_right_on_trigger_by_triggerid(null, $row['triggerid'], $accessible_hosts)) + if(!check_right_on_trigger_by_triggerid(null, $row['triggerid'])) continue; if(is_null($row['host'])) $row['host'] = ''; |