292
292
* NOTE: templates = array(id => name, id2 => name2, ...)
294
294
function update_host($hostid,$host,$port,$status,$useip,$dns,$ip,$proxy_hostid,$templates,$useipmi,$ipmi_ip,$ipmi_port,$ipmi_authtype,$ipmi_privilege,$ipmi_username,$ipmi_password,$newgroup,$groups)
297
297
$old_templates = get_templates_by_hostid($hostid);
298
298
$unlinked_templates = array_diff($old_templates, $templates);
300
300
foreach($unlinked_templates as $id => $name){
301
301
unlink_template($hostid, $id);
304
304
$old_host = get_host_by_hostid($hostid);
306
306
$new_templates = array_diff($templates, $old_templates);