From 664f54f60f1bdb1494801cc674b7bc6b60864db2 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Wed, 12 Sep 2012 05:33:31 -0400
Subject: [PATCH] Bugfix: Database creation through remoting api failed

---
 interface/lib/classes/remoting.inc.php |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index d39769b..c47eb63 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -1255,6 +1255,8 @@
 	//* Add a record
 	public function sites_database_add($session_id, $client_id, $params)
     {
+        global $app;
+        
 		if(!$this->checkPerm($session_id, 'sites_database_add')) {
 			$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
 			return false;
@@ -1277,6 +1279,8 @@
 	//* Update a record
 	public function sites_database_update($session_id, $client_id, $primary_id, $params)
     {
+        global $app;
+        
 		if(!$this->checkPerm($session_id, 'sites_database_update')) {
 			$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
 			return false;
@@ -1298,6 +1302,7 @@
 	//* Delete a record
 	public function sites_database_delete($session_id, $primary_id)
     {
+        global $app;
 		if(!$this->checkPerm($session_id, 'sites_database_delete')) {
 			$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
 			return false;

--
Gitblit v1.9.1