From 6f1cca790cd4b9199c863c15803b366a90c3340b Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Tue, 11 Sep 2012 06:50:40 -0400
Subject: [PATCH] Domain module was moved to client - changed remoting lib to match this.

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

diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index c89f8ed..1754125 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -1063,7 +1063,8 @@
 					$this->server->fault('permission_denied','You do not have the permissions to access this function.');
 					return false;
 			}
-		$affected_rows = $this->klientadd('../client/form/' . ($reseller_id ? 'reseller' : 'client') . '.tform.php',$reseller_id, $params);
+        if(!isset($params['parent_client_id']) || $params['parent_client_id'] == 0) $params['parent_client_id'] = $reseller_id;
+		$affected_rows = $this->klientadd('../client/form/' . (isset($params['limit_client']) && $params['limit_client'] > 0 ? 'reseller' : 'client') . '.tform.php',$reseller_id, $params);
 		return $affected_rows;  
 				  
 	}
@@ -1077,7 +1078,8 @@
 					$this->server->fault('permission_denied','You do not have the permissions to access this function.');
 					return false;
 			}
-			$affected_rows = $this->updateQuery('../client/form/' . ($reseller_id ? 'reseller' : 'client') . '.tform.php', $reseller_id, $client_id, $params);
+            if(!isset($params['parent_client_id']) || $params['parent_client_id'] == 0) $params['parent_client_id'] = $reseller_id;
+			$affected_rows = $this->updateQuery('../client/form/' . (isset($params['limit_client']) && $params['limit_client'] > 0 ? 'reseller' : 'client') . '.tform.php', $reseller_id, $client_id, $params);
 			
 			$app->remoting_lib->ispconfig_sysuser_update($params,$client_id);
 			
@@ -1833,7 +1835,7 @@
 			return false;
 		}
 		$app->uses('remoting_lib');
-		$app->remoting_lib->loadFormDef('../domain/form/domain.tform.php');
+		$app->remoting_lib->loadFormDef('../client/form/domain.tform.php');
 		return $app->remoting_lib->getDataRecord($primary_id);
 	}
 
@@ -1844,7 +1846,7 @@
 			$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
 			return false;
 		}
-		return $this->insertQuery('../domain/form/domain.tform.php',$client_id,$params);
+		return $this->insertQuery('../client/form/domain.tform.php',$client_id,$params);
 	}
 
 	//* Delete a record
@@ -1854,7 +1856,7 @@
 			$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
 			return false;
 		}
-		$affected_rows = $this->deleteQuery('../domain/form/domain.tform.php',$primary_id);
+		$affected_rows = $this->deleteQuery('../client/form/domain.tform.php',$primary_id);
 		return $affected_rows;
 	}
 

--
Gitblit v1.9.1