summaryrefslogtreecommitdiffstats
path: root/frontends/php/actions.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-02-08 20:31:07 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-02-08 20:31:07 +0000
commit5ad9a7a76d255d3cf47f8b678433efcbb9e57134 (patch)
tree073a6a52fc03d8cb6ec5db17227a1cc87d14dd67 /frontends/php/actions.php
parent88e356bd3c51be5db7f7bafdc6b0acaedcc68182 (diff)
- changed DB schema. Dropped foreign key for table actions (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1247 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/actions.php')
-rw-r--r--frontends/php/actions.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/frontends/php/actions.php b/frontends/php/actions.php
index fbeafcdd..6bf1dd62 100644
--- a/frontends/php/actions.php
+++ b/frontends/php/actions.php
@@ -28,7 +28,7 @@
?>
<?php
- if(!check_right_on_trigger("U",$HTTP_GET_VARS["triggerid"]))
+ if(($HTTP_GET_VARS["triggerid"]!=0)&&!check_right_on_trigger("U",$HTTP_GET_VARS["triggerid"]))
{
show_table_header("<font color=\"AA0000\">No permissions !</font>");
show_footer();
@@ -140,13 +140,7 @@
if($row["scope"] == 1)
{
-// $sql="select * from actions a,triggers t,hosts h,functions f,items i where a.triggerid=t.triggerid and f.triggerid=t.triggerid and i.itemid=f.itemid and h.hostid=i.hostid and t.triggerid=".$HTTP_GET_VARS["triggerid"]." and a.scope=1";
- $sql="select h.hostid from triggers t,hosts h,functions f,items i where f.triggerid=t.triggerid and i.itemid=f.itemid and h.hostid=i.hostid and t.triggerid=".$HTTP_GET_VARS["triggerid"];
-// echo $sql;
- $result2=DBselect($sql);
- if(DBnum_rows($result2)==0) continue;
- $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 i.itemid=f.itemid and h.hostid=i.hostid and t.triggerid=".$row["triggerid"]." and a.scope=1 and h.hostid=".$row2["hostid"];
+ $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;
$result2=DBselect($sql);
if(DBnum_rows($result2)==0) continue;