From dda56131ff3c29ab446f4c0844ea1e841f963218 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Tue, 09 Oct 2012 06:10:18 -0400
Subject: [PATCH] Bugfix: activated table sorting on default theme

---
 interface/web/sites/database_edit.php |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php
index 1393aaf..959b018 100644
--- a/interface/web/sites/database_edit.php
+++ b/interface/web/sites/database_edit.php
@@ -148,7 +148,7 @@
 			// When the record is updated
 			if($this->id > 0) {
 				// restore the server ID if the user is not admin and record is edited
-				$tmp = $app->db->queryOneRecord("SELECT server_id FROM web_database WHERE database_id = ".intval($this->id));
+				$tmp = $app->db->queryOneRecord("SELECT server_id FROM web_database WHERE database_id = ".$app->functions->intval($this->id));
 				$this->dataRecord["server_id"] = $tmp["server_id"];
 				unset($tmp);
 				// When the record is inserted
@@ -309,6 +309,7 @@
         global $app;
         if(!empty($sql) && !$app->tform->isReadonlyTab($app->tform->getCurrentTab(),$this->id)) {
             
+            $app->uses('sites_database_plugin');
             $app->sites_database_plugin->processDatabaseUpdate($this);
 
             $app->db->query($sql);
@@ -320,7 +321,7 @@
 		global $app, $conf;
 		
 		if($this->dataRecord["parent_domain_id"] > 0) {
-			$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($this->dataRecord["parent_domain_id"]));
+			$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($this->dataRecord["parent_domain_id"]));
 		
 			//* The Database user shall be owned by the same group then the website
 			$sys_groupid = $web['sys_groupid'];
@@ -336,7 +337,7 @@
 		global $app, $conf;
 
 		if($this->dataRecord["parent_domain_id"] > 0) {
-			$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($this->dataRecord["parent_domain_id"]));
+			$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($this->dataRecord["parent_domain_id"]));
 		
 			//* The Database user shall be owned by the same group then the website
 			$sys_groupid = $web['sys_groupid'];

--
Gitblit v1.9.1