From b283f9c3b2d16e6c29eaf5240607f21c580ce8d2 Mon Sep 17 00:00:00 2001
From: Falko Timme <ft@falkotimme.com>
Date: Wed, 30 Apr 2014 04:26:25 -0400
Subject: [PATCH] - Re-enabled "Remember Password"- function on login screen.

---
 interface/web/vm/openvz_template_edit.php |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/interface/web/vm/openvz_template_edit.php b/interface/web/vm/openvz_template_edit.php
index c074002..ec520d0 100644
--- a/interface/web/vm/openvz_template_edit.php
+++ b/interface/web/vm/openvz_template_edit.php
@@ -38,8 +38,8 @@
 * End Form configuration
 ******************************************/
 
-require_once('../../lib/config.inc.php');
-require_once('../../lib/app.inc.php');
+require_once '../../lib/config.inc.php';
+require_once '../../lib/app.inc.php';
 
 //* Check permissions for module
 $app->auth->check_module_permissions('vm');
@@ -50,28 +50,28 @@
 $app->load('tform_actions');
 
 class page_action extends tform_actions {
-	
+
 	function onAfterInsert() {
-		global $app,$conf;
-		
-		$guar_ram = $this->dataRecord['ram']*256;
-		$burst_ram = $this->dataRecord['ram_burst']*256;
+		global $app, $conf;
+
+		$guar_ram = $app->functions->intval($this->dataRecord['ram']*256);
+		$burst_ram = $app->functions->intval($this->dataRecord['ram_burst']*256);
 		$sql = "UPDATE openvz_template SET shmpages = '$guar_ram:$guar_ram',vmguarpages = '$guar_ram:$guar_ram', oomguarpages = '$guar_ram:$guar_ram',privvmpages = '$burst_ram:$burst_ram' WHERE template_id = $this->id";
 		$app->db->query($sql);
 	}
-	
+
 	function onAfterUpdate() {
-		global $app,$conf;
-		
-		$guar_ram = $this->dataRecord['ram']*256;
-		$burst_ram = $this->dataRecord['ram_burst']*256;
+		global $app, $conf;
+
+		$guar_ram = $app->functions->intval($this->dataRecord['ram']*256);
+		$burst_ram = $app->functions->intval($this->dataRecord['ram_burst']*256);
 		$sql = "UPDATE openvz_template SET shmpages = '$guar_ram:$guar_ram',vmguarpages = '$guar_ram:$guar_ram', oomguarpages = '$guar_ram:$guar_ram',privvmpages = '$burst_ram:$burst_ram' WHERE template_id = $this->id";
 		$app->db->query($sql);
 	}
-	
+
 }
 
 $page = new page_action;
 $page->onLoad();
 
-?>
\ No newline at end of file
+?>

--
Gitblit v1.9.1