From a3609a0f7fbd97ae487341e88c0b81fc5bf5b81d Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Thu, 07 May 2015 04:48:16 -0400
Subject: [PATCH] FS#2096 - Add "iptables" line in openvz vhost template file

---
 interface/lib/plugins/vm_openvz_plugin.inc.php |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/interface/lib/plugins/vm_openvz_plugin.inc.php b/interface/lib/plugins/vm_openvz_plugin.inc.php
index 7cf46e6..73cc9cd 100644
--- a/interface/lib/plugins/vm_openvz_plugin.inc.php
+++ b/interface/lib/plugins/vm_openvz_plugin.inc.php
@@ -133,9 +133,10 @@
 		$sql .= "nameserver = ?, ";
 		$sql .= "create_dns = ?, ";
 		$sql .= "capability = ?, ";
-		$sql .= "features = ? ";
+		$sql .= "features = ?, ";
+		$sql .= "iptables = ? ";
 		$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'], $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'], $this->id);
 
 	}
 
@@ -195,6 +196,7 @@
 		$tpl->setVar('nameserver', $vm['nameserver']);
 		$tpl->setVar('capability', $vm['capability']);
 		$tpl->setVar('features', $vm['features']);
+		$tpl->setVar('iptables', $vm['iptables']);
 
 		$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']);

--
Gitblit v1.9.1