summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/hosts.inc.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-05-08 06:56:46 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-05-08 06:56:46 +0000
commit86ada7d77c1ce15210d7894d0858bbafd3a3f0c6 (patch)
tree5624f1a872a7df3006c6dd90266d03a10d070731 /frontends/php/include/hosts.inc.php
parent1f6bef28b8801d8f902ab23c520dfcf7430b1394 (diff)
- [DEV-149] partial implementation {beta} (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5682 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/hosts.inc.php')
-rw-r--r--frontends/php/include/hosts.inc.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php
index 40b39caa..5364953a 100644
--- a/frontends/php/include/hosts.inc.php
+++ b/frontends/php/include/hosts.inc.php
@@ -283,13 +283,13 @@ require_once "include/items.inc.php";
* Comments:
*
* NOTE: templates = array(id => name, id2 => name2, ...)
- */
- function update_host($hostid,$host,$port,$status,$useip,$dns,$ip,$proxy_hostid,$templates,$newgroup,$groups)
- {
+ */
+ function update_host($hostid,$host,$port,$status,$useip,$dns,$ip,$proxy_hostid,$templates,$newgroup,$groups){
+
$old_templates = get_templates_by_hostid($hostid);
$unlinked_templates = array_diff($old_templates, $templates);
- foreach($unlinked_templates as $id => $name)
- {
+
+ foreach($unlinked_templates as $id => $name){
unlink_template($hostid, $id);
}
@@ -302,11 +302,9 @@ require_once "include/items.inc.php";
return $result;
update_host_groups($hostid, $groups);
-
add_group_to_host($hostid,$newgroup);
- if(count($new_templates) > 0)
- {
+ if(count($new_templates) > 0){
sync_host_with_templates($hostid,array_keys($new_templates));
}