diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-12 07:01:06 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-12 07:01:06 +0000 |
| commit | 06f68476ff0a32ab823885118054595894016f06 (patch) | |
| tree | b0f18b6058f40b4daa8aafc0c4e6995372ccaf8d /frontends/php/include/maps.inc.php | |
| parent | b327677b4e405ccc71f6292fad2ff08abe2f7c99 (diff) | |
| download | zabbix-06f68476ff0a32ab823885118054595894016f06.tar.gz zabbix-06f68476ff0a32ab823885118054595894016f06.tar.xz zabbix-06f68476ff0a32ab823885118054595894016f06.zip | |
- fixes to zabbix_sender and other changes (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@2823 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/maps.inc.php')
| -rw-r--r-- | frontends/php/include/maps.inc.php | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/frontends/php/include/maps.inc.php b/frontends/php/include/maps.inc.php index c2197b9d..9517927d 100644 --- a/frontends/php/include/maps.inc.php +++ b/frontends/php/include/maps.inc.php @@ -23,9 +23,10 @@ { $sql="select * from sysmaps where sysmapid=$sysmapid"; $result=DBselect($sql); - if(DBnum_rows($result) == 1) + $row=DBfetch($result); + if($row) { - return DBfetch($result); + return $row; } else { @@ -38,9 +39,10 @@ { $sql="select * from sysmaps_elements where selementid=$selementid"; $result=DBselect($sql); - if(DBnum_rows($result) == 1) + $row=DBfetch($result); + if($row) { - return DBfetch($result); + return $row; } else { @@ -261,16 +263,18 @@ " and i.hostid=".$db_element["elementid"]." and i.itemid=f.itemid". " and f.triggerid=t.triggerid and t.value=1 and t.status=0". " and h.status=".HOST_STATUS_MONITORED." and i.status=0"); - $count = DBnum_rows($db_triggers); - if($count == 1) + $count=0; + $trigger = DBfetch($db_triggers); + if($trigger) { - $trigger = DBfetch($db_triggers); + for($count=1; DBfetch($db_triggers); $count++); + if ($trigger["priority"] > 3) $color=$colors["Red"]; else $color=$colors["Dark Yellow"]; $info = expand_trigger_description_simple($trigger["triggerid"]); } - elseif($count==0) + else { $host = get_host_by_hostid($db_element["elementid"]); if($host["status"] == HOST_STATUS_TEMPLATE) |
