summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/hosts.inc.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-08 14:54:32 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-08 14:54:32 +0000
commit579448298e554487e82ec07ea2f5b2a9cc6adfd0 (patch)
treef07eb8e7dfc6ea17616eab89011dd83ff13e4c2d /frontends/php/include/hosts.inc.php
parent8e31e9456753eb36e2630ddbb723581d8ca99f44 (diff)
downloadzabbix-579448298e554487e82ec07ea2f5b2a9cc6adfd0.tar.gz
zabbix-579448298e554487e82ec07ea2f5b2a9cc6adfd0.tar.xz
zabbix-579448298e554487e82ec07ea2f5b2a9cc6adfd0.zip
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@2821 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/hosts.inc.php')
-rw-r--r--frontends/php/include/hosts.inc.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php
index 00e9eb95..07e1c686 100644
--- a/frontends/php/include/hosts.inc.php
+++ b/frontends/php/include/hosts.inc.php
@@ -478,8 +478,11 @@
if($groupid > 0)
{
- if(DBnum_rows(DBselect("select hg.hostid from hosts_groups hg".
- " where hg.groupid=".$groupid." and hg.hostid=".$hostid)) != 1)
+// if(DBnum_rows(DBselect("select hg.hostid from hosts_groups hg".
+// " where hg.groupid=".$groupid." and hg.hostid=".$hostid)) != 1)
+// $hostid = 0;
+ if(!DBfetch(DBselect("select hg.hostid from hosts_groups hg".
+ " where hg.groupid=".$groupid." and hg.hostid=".$hostid)))
$hostid = 0;
}
@@ -487,9 +490,13 @@
if($hostid > 0)
{
- if(DBnum_rows(DBselect("select distinct h.hostid from hosts h".$item_table.
+// if(DBnum_rows(DBselect("select distinct h.hostid from hosts h".$item_table.
+// " where h.status<>".HOST_STATUS_DELETED.$with_host_status.$with_items.
+// " and h.hostid=".$hostid)) != 1)
+// $hostid = 0;
+ if(!DBfetch(DBselect("select distinct h.hostid from hosts h".$item_table.
" where h.status<>".HOST_STATUS_DELETED.$with_host_status.$with_items.
- " and h.hostid=".$hostid)) != 1)
+ " and h.hostid=".$hostid)))
$hostid = 0;
}