From 5ca959fa688255a8de61f89fe2751eb4d24a6912 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Tue, 22 Mar 2016 09:22:07 -0400
Subject: [PATCH] fixed typo

---
 interface/lib/plugins/vm_openvz_plugin.inc.php |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/interface/lib/plugins/vm_openvz_plugin.inc.php b/interface/lib/plugins/vm_openvz_plugin.inc.php
index 5f6e3bb..281fae4 100644
--- a/interface/lib/plugins/vm_openvz_plugin.inc.php
+++ b/interface/lib/plugins/vm_openvz_plugin.inc.php
@@ -134,8 +134,6 @@
 		foreach ($tmp_rec as $tmp) {
 			$app->db->datalogUpdate('openvz_ip', array('vm_id' => 0), 'ip_address_id', $tmp['ip_address_id']);
 		}
-		unset($tmp);
-		unset($tmp_rec);
 	}
 
 	private function applyTemplate() {
@@ -156,8 +154,9 @@
 		$sql .= "capability = ?, ";
 		$sql .= "features = ?, ";
 		$sql .= "iptables = ? ";
+		$sql .= "custom = ? ";
 		$sql .= "WHERE vm_id = ?";
-		$app->db->query($sql, $tpl['diskspace'], $tpl['ram'], $tpl['ram_burst'], $tpl['cpu_units'], $tpl['cpu_num'], $tpl['cpu_limit'], $tpl['io_priority'], $tpl['nameserver'], $tpl['create_dns'], $tpl['capability'], $tpl['features'], $tpl['iptables'], $this->id);
+		$app->db->query($sql, $tpl['diskspace'], $tpl['ram'], $tpl['ram_burst'], $tpl['cpu_units'], $tpl['cpu_num'], $tpl['cpu_limit'], $tpl['io_priority'], $tpl['nameserver'], $tpl['create_dns'], $tpl['capability'], $tpl['features'], $tpl['iptables'], $tpl['custom'], $this->id);
 
 	}
 
@@ -176,13 +175,14 @@
 		$onboot = ($vm['start_boot'] == 'y')?'yes':'no';
 		$tpl->setVar('onboot', $onboot);
 
+		$tpl->setVar('bootorder', $vm['bootorder']);
 		$tpl->setVar('kmemsize', $vm_template['kmemsize']);
 		$tpl->setVar('lockedpages', $vm_template['lockedpages']);
-		$tpl->setVar('privvmpages', $burst_ram.':'.$burst_ram);
+		$tpl->setVar('privvmpages', $burst_ram.':'.$burst_ram*1.0625);
 		$tpl->setVar('shmpages', $guar_ram.':'.$guar_ram);
 		$tpl->setVar('numproc', $vm_template['numproc']);
 		$tpl->setVar('physpages', $vm_template['physpages']);
-		$tpl->setVar('vmguarpages', $guar_ram.':'.$guar_ram);
+		$tpl->setVar('vmguarpages', $guar_ram.':unlimited');
 		$tpl->setVar('oomguarpages', $guar_ram.':'.$guar_ram);
 		$tpl->setVar('numtcpsock', $vm_template['numtcpsock']);
 		$tpl->setVar('numflock', $vm_template['numflock']);
@@ -230,6 +230,8 @@
 		$tpl->setVar('features', $vm['features']);
 		$tpl->setVar('iptables', $vm['iptables']);
 
+		$tpl->setVar('custom', $vm['custom']);
+
 		$tmp = $app->db->queryOneRecord("SELECT template_file FROM openvz_ostemplate WHERE ostemplate_id = ?", $app->functions->intval($vm['ostemplate_id']));
 		$tpl->setVar('ostemplate', $tmp['template_file']);
 		unset($tmp);

--
Gitblit v1.9.1