} $host->set_descr($descr); if ($icon != '') { $host->set_icon($icon); } else { if ($is_in_db == TRUE && empty($h_icon)) { $host->set_icon(NULL); } } $host->set_fqdns($fqdns); $host->set_external($external); $host->set_location($latitude, $longitude, $zoom); $host->set_asset_value($asset_value); $os_data = array("value" => $os, "source" => array("id" => 1)); $host->set_os($os_data); $host->set_model($model); $host->set_devices($devices); $host->set_sensors($sensors); $host->save_in_db($conn); Asset_host_scan::delete_plugin_from_db($conn, $id, 2007); if (!empty($nagios)) { Asset_host_scan::save_plugin_in_db($conn, $id, 2007); } $data['status'] = 'OK'; $data['data'] = _('Your changes have been saved'); $db->close(); } else { $data['status'] = 'error'; $data['data'] = array('no_create_asset' => _("You do not have the correct permissions to create assets. Please contact system administrator with any questions")); } } catch (Exception $e) {