diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2004-02-16 21:10:32 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2004-02-16 21:10:32 +0000 |
commit | 64783dd7e2037814b9e114dfebb001f0351d6878 (patch) | |
tree | e9619c44d4bb093e92327681042e5e70da414cf7 /frontends/php/actions.php | |
parent | 58dab1edee50d50a2312bd0e82cb194eb02221f6 (diff) | |
download | zabbix-64783dd7e2037814b9e114dfebb001f0351d6878.tar.gz zabbix-64783dd7e2037814b9e114dfebb001f0351d6878.tar.xz zabbix-64783dd7e2037814b9e114dfebb001f0351d6878.zip |
More improvements for action screen.
git-svn-id: svn://svn.zabbix.com/trunk@1261 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/actions.php')
-rw-r--r-- | frontends/php/actions.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/frontends/php/actions.php b/frontends/php/actions.php index 1948c32b..3fdbfe3f 100644 --- a/frontends/php/actions.php +++ b/frontends/php/actions.php @@ -140,10 +140,18 @@ if($row["scope"] == 1) { - $sql="select * from actions a,triggers t,hosts h,functions f where a.triggerid=t.triggerid and f.triggerid=t.triggerid and h.hostid=a.triggerid and t.hostid=h.hostid and t.triggerid=".$HTTP_GET_VARS["triggerid"]."and a.scope=1 and h.hostid=".$row["triggerid"]; -// echo $sql; + $sql="select h.hostid from triggers t,hosts h,functions f,items i where f.triggerid=t.triggerid and h.hostid=i.hostid and i.itemid=f.itemid and t.triggerid=".$HTTP_GET_VARS["triggerid"]; +// echo "$sql<br>"; $result2=DBselect($sql); -// if(DBnum_rows($result2)==0) continue; + $found=0; + while($row2=DBfetch($result2)) + { + $sql="select * from actions a,triggers t,hosts h,functions f,items i where a.triggerid=t.triggerid and f.triggerid=t.triggerid and h.hostid=a.triggerid and i.hostid=h.hostid and a.actionid=".$row["actionid"]." and a.scope=1 and h.hostid=".$row2["hostid"]; +// echo "$sql<br>"; + $result3=DBselect($sql); + if(DBnum_rows($result3)>0) $found=1; + } + if($found==0) continue; } if(isset($actionid) && ($actionid==$row["actionid"])) |