summaryrefslogtreecommitdiffstats
path: root/frontends/php/report2.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-12-11 15:12:31 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-12-11 15:12:31 +0000
commitc5d0cb04c085a0ea496ab12e346924662f190ac5 (patch)
treec56951b7c40f9161f07c899a283d7ba3d1f11942 /frontends/php/report2.php
parent2e5dbab4c69ad5de57b0e53fd529c194a53a58a2 (diff)
downloadzabbix-c5d0cb04c085a0ea496ab12e346924662f190ac5.tar.gz
zabbix-c5d0cb04c085a0ea496ab12e346924662f190ac5.tar.xz
zabbix-c5d0cb04c085a0ea496ab12e346924662f190ac5.zip
- [ZBX-203] fixing issue with "Availability Report" (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5158 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/report2.php')
-rw-r--r--frontends/php/report2.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/frontends/php/report2.php b/frontends/php/report2.php
index 0ac68ad0..78c33491 100644
--- a/frontends/php/report2.php
+++ b/frontends/php/report2.php
@@ -68,7 +68,8 @@ show_report2_header($config,$available_hosts);
' WHERE t.triggerid='.$_REQUEST['triggerid'].
' AND t.triggerid=f.triggerid '.
' AND f.itemid=i.itemid '.
- ' AND i.hostid=h.hostid '
+ ' AND i.hostid=h.hostid '.
+ ' AND h.hostid in ('.$available_hosts.') '
))) )
{
unset($_REQUEST['triggerid']);
@@ -97,7 +98,7 @@ show_report2_header($config,$available_hosts);
if($_REQUEST['hostid'] > 0) $sql_cond.=' AND ht.templateid='.$_REQUEST['hostid'];
if(isset($_REQUEST['tpl_triggerid']) && ($_REQUEST['tpl_triggerid'] > 0))
- $sql_cond.= ' AND t.triggerid='.$_REQUEST['tpl_triggerid'];
+ $sql_cond.= ' AND t.templateid='.$_REQUEST['tpl_triggerid'];
}
if($_REQUEST['hostid'] > 0){
@@ -108,6 +109,7 @@ show_report2_header($config,$available_hosts);
' FROM triggers t,hosts h,items i,functions f, hosts_templates ht '.
' WHERE f.itemid=i.itemid '.
' AND h.hostid=i.hostid '.
+ ' AND h.hostid in ('.$available_hosts.') '.
' AND t.status='.TRIGGER_STATUS_ENABLED.
' AND t.triggerid=f.triggerid '.
' AND '.DBin_node('t.triggerid').