From a5fe2742b8e90e7bb2ee4a3a9df3ea64afd6eaff Mon Sep 17 00:00:00 2001
From: xaver <xaver@ispconfig3>
Date: Fri, 09 Sep 2011 14:09:31 -0400
Subject: [PATCH] Fixed #1390 - Added 3ware controller (was my script i use 3ware)

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

diff --git a/interface/lib/plugins/vm_openvz_plugin.inc.php b/interface/lib/plugins/vm_openvz_plugin.inc.php
index a926c0a..b1ce8e6 100644
--- a/interface/lib/plugins/vm_openvz_plugin.inc.php
+++ b/interface/lib/plugins/vm_openvz_plugin.inc.php
@@ -140,13 +140,14 @@
 	private function makeOpenVZConfig() {
 		global $app, $conf;
 		
-		$vm = $app->tform->getDataRecord($this->id);
+		$vm = $app->db->queryOneRecord("SELECT * FROM openvz_vm WHERE vm_id = ".$this->id);
 		$vm_template = $app->db->queryOneRecord("SELECT * FROM openvz_template WHERE template_id = ".$vm['template_id']);
 		$burst_ram = $vm['ram_burst']*256;
 		$guar_ram = $vm['ram']*256;
 		
+		$app->load('tpl');
 		$tpl = new tpl();
-		$tpl->newTemplate('templates/openvz.conf.tpl');
+		$tpl->newTemplate('../vm/templates/openvz.conf.tpl');
 		
 		$onboot = ($vm['start_boot'] == 'y')?'yes':'no';
 		$tpl->setVar('onboot',$onboot);
@@ -205,7 +206,7 @@
 	private function createDNS() {
 		global $app, $conf;
 		
-		$vm = $app->tform->getDataRecord($this->id);
+		$vm = $app->db->queryOneRecord("SELECT * FROM openvz_vm WHERE vm_id = ".$this->id);
 		
 		if($vm['create_dns'] != 'y') return;
 		

--
Gitblit v1.9.1