summaryrefslogtreecommitdiffstats
path: root/frontends/php/events.php
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-04-09 11:17:50 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-04-09 11:17:50 +0000
commit967bde43d4c97821fbeb56f555f419d8a566de73 (patch)
treeb96d8464b829f534b6215f4173b3780eff28f6fa /frontends/php/events.php
parent20c868daba2e67f316f7a73258a10e2996e55859 (diff)
downloadzabbix-967bde43d4c97821fbeb56f555f419d8a566de73.tar.gz
zabbix-967bde43d4c97821fbeb56f555f419d8a566de73.tar.xz
zabbix-967bde43d4c97821fbeb56f555f419d8a566de73.zip
- [ZBX-350] fixed processing in_condition under Oracle (Sasha)
[merged from branches/1.4 5599:5600] git-svn-id: svn://svn.zabbix.com/trunk@5601 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/events.php')
-rw-r--r--frontends/php/events.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/frontends/php/events.php b/frontends/php/events.php
index c148758f..53890bf2 100644
--- a/frontends/php/events.php
+++ b/frontends/php/events.php
@@ -248,7 +248,7 @@ include_once "include/page_header.php";
//---
$triggers = array();
- $trigger_list = '';
+ $trigger_list = array();
$sql = 'SELECT DISTINCT t.triggerid,t.priority,t.description,t.expression,h.host,t.type '.
' FROM triggers t, functions f, items i, hosts h '.$sql_from.
@@ -262,10 +262,9 @@ include_once "include/page_header.php";
$rez = DBselect($sql);
while($rowz = DBfetch($rez)){
$triggers[$rowz['triggerid']] = $rowz;
- $trigger_list.=$rowz['triggerid'].',';
+ array_push($trigger_list, $rowz['triggerid']);
}
- $trigger_list = '('.trim($trigger_list,',').')';
$sql_cond=($show_unknown == 0)?(' AND e.value<>'.TRIGGER_VALUE_UNKNOWN.' '):('');
$sql_cond.=($_REQUEST['filter_timesince']>0)?' AND e.clock>'.$_REQUEST['filter_timesince']:' AND e.clock>100';
$sql_cond.=($_REQUEST['filter_timetill']>0)?' AND e.clock<'.$_REQUEST['filter_timetill']:'';
@@ -288,7 +287,7 @@ include_once "include/page_header.php";
$sql = 'SELECT e.eventid, e.objectid as triggerid, e.clock, e.value, e.acknowledged '.
' FROM events e '.
' WHERE (e.object+0)='.EVENT_OBJECT_TRIGGER.
- ' AND e.objectid IN '.$trigger_list.
+ ' AND '.DBin_condition('e.objectid', $trigger_list).
$sql_cond.
order_by('e.clock');
//SDI($sql);