summaryrefslogtreecommitdiffstats
path: root/frontends/php/map.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-31 11:43:21 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-31 11:43:21 +0000
commit23a26fe8f5409070c9a4e4502e9973e47389433a (patch)
treed362a441952c53172a3f0242f6bb5b3f165fb2db /frontends/php/map.php
parent4c4d305c9f216a5c1046c960642bcfa387d509a4 (diff)
downloadzabbix-23a26fe8f5409070c9a4e4502e9973e47389433a.tar.gz
zabbix-23a26fe8f5409070c9a4e4502e9973e47389433a.tar.xz
zabbix-23a26fe8f5409070c9a4e4502e9973e47389433a.zip
- Bug fixing (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2589 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/map.php')
-rw-r--r--frontends/php/map.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/frontends/php/map.php b/frontends/php/map.php
index 6b72ebba..c3049e1b 100644
--- a/frontends/php/map.php
+++ b/frontends/php/map.php
@@ -147,6 +147,16 @@
$result=DBselect("select shostid1,shostid2,triggerid,color_off,drawtype_off,color_on,drawtype_on from sysmaps_links where sysmapid=".$_REQUEST["sysmapid"]);
while($row=DBfetch($result))
{
+ /* skeep connections for deleted hosts */
+ $db_hosts = DBselect("select h.hostid".
+ " from sysmaps_hosts sh,hosts h".
+ " where sh.sysmapid=".$_REQUEST["sysmapid"].
+ " and h.hostid=sh.hostid".
+ " and h.status not in (".HOST_STATUS_DELETED.")".
+ " and (sh.shostid=".$row["shostid1"]." or sh.shostid=".$row["shostid2"].")");
+ if(DBnum_rows($db_hosts) < 2) continue;
+
+
$shostid1=$row["shostid1"];
$shostid2=$row["shostid2"];
$triggerid=$row["triggerid"];
@@ -235,7 +245,11 @@
# Draw hosts
$icons=array();
- $result=DBselect("select h.host,sh.shostid,sh.sysmapid,sh.hostid,sh.label,sh.x,sh.y,h.status,sh.icon,sh.icon_on,h.ip from sysmaps_hosts sh,hosts h where sh.sysmapid=".$_REQUEST["sysmapid"]." and h.hostid=sh.hostid");
+ $result=DBselect("select h.host,sh.shostid,sh.sysmapid,sh.hostid,sh.label,sh.x,sh.y,".
+ "h.status,sh.icon,sh.icon_on,h.ip from sysmaps_hosts sh,hosts h".
+ " where sh.sysmapid=".$_REQUEST["sysmapid"]." and h.hostid=sh.hostid".
+ " and h.status<>".HOST_STATUS_DELETED);
+
while($row=DBfetch($result))
{
$host=$row["host"];