summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/hosts.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-12-07 14:23:35 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-12-07 14:23:35 +0000
commiteeaaf5c1244165f4f6be4e3452231d01ab17cbde (patch)
tree63faeba3c12cb875760b1a8ccb600ae81d50343b /frontends/php/include/hosts.inc.php
parentabace169fdc81d2f83c84fd29b7e6a8c75c0e5d3 (diff)
downloadzabbix-eeaaf5c1244165f4f6be4e3452231d01ab17cbde.tar.gz
zabbix-eeaaf5c1244165f4f6be4e3452231d01ab17cbde.tar.xz
zabbix-eeaaf5c1244165f4f6be4e3452231d01ab17cbde.zip
- fixed updating of hosts (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3575 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/hosts.inc.php')
-rw-r--r--frontends/php/include/hosts.inc.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php
index b4459d7d..eec222fa 100644
--- a/frontends/php/include/hosts.inc.php
+++ b/frontends/php/include/hosts.inc.php
@@ -223,7 +223,9 @@ require_once "include/items.inc.php";
$old_host = get_host_by_hostid($hostid);
- $result = db_save_host($host,$port,$status,$useip,$ip,$templates,$hostid);
+ $new_templates = array_diff($templates, $old_templates);
+
+ $result = db_save_host($host,$port,$status,$useip,$ip,$new_templates,$hostid);
if(!$result)
return $result;
@@ -231,7 +233,6 @@ require_once "include/items.inc.php";
add_group_to_host($hostid,$newgroup);
- $new_templates = array_diff($templates, $old_templates);
if(count($new_templates) > 0)
{
sync_host_with_templates($hostid,$new_templates);