From eeaaf5c1244165f4f6be4e3452231d01ab17cbde Mon Sep 17 00:00:00 2001 From: osmiy Date: Thu, 7 Dec 2006 14:23:35 +0000 Subject: - fixed updating of hosts (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@3575 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/hosts.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'frontends/php/include') 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); -- cgit