From ecb6b3a8035679f652ed0d80ca624d8a0c6c57f1 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Wed, 22 Aug 2012 14:13:12 -0400
Subject: [PATCH] - Added database, database_user and vhost subdomain functions to the remoting - Added interface plugins for db and db users - changed remoting (splitted up insert, update and deletequery)

---
 interface/lib/plugins/vm_openvz_plugin.inc.php |    8 +++++---
 1 files changed, 5 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..42a6530 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);
@@ -172,6 +173,7 @@
 		$tpl->setVar('numfile',$vm_template['numfile']);
 		$tpl->setVar('avnumproc',$vm_template['avnumproc']);
 		$tpl->setVar('numiptent',$vm_template['numiptent']);
+		$tpl->setVar('swappages',$vm_template['swappages']);
 		
 		$diskspace = $vm['diskspace']*1048576;
 		$diskinodes = $vm['diskspace']*524288;
@@ -205,7 +207,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