From b1a6a5a3991cec5cd08873b01376e45d0b247f18 Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Thu, 14 Nov 2013 09:05:33 -0500 Subject: [PATCH] Cleaning up code to match coding guidelines --- interface/lib/classes/remote.d/domains.inc.php | 34 +++++++++++++++++----------------- 1 files changed, 17 insertions(+), 17 deletions(-) diff --git a/interface/lib/classes/remote.d/domains.inc.php b/interface/lib/classes/remote.d/domains.inc.php index 2afe815..9bba710 100644 --- a/interface/lib/classes/remote.d/domains.inc.php +++ b/interface/lib/classes/remote.d/domains.inc.php @@ -40,12 +40,12 @@ class remoting_domains extends remoting { // ----------------------------------------------------------------------------------------------- - + //* Get record details public function domains_domain_get($session_id, $primary_id) - { + { global $app; - + if(!$this->checkPerm($session_id, 'domains_domain_get')) { throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); return false; @@ -57,40 +57,40 @@ //* Add a record public function domains_domain_add($session_id, $client_id, $params) - { + { if(!$this->checkPerm($session_id, 'domains_domain_add')) { throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); return false; } - return $this->insertQuery('../client/form/domain.tform.php',$client_id,$params); + return $this->insertQuery('../client/form/domain.tform.php', $client_id, $params); } //* Delete a record public function domains_domain_delete($session_id, $primary_id) - { + { if(!$this->checkPerm($session_id, 'domains_domain_delete')) { throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); return false; } - $affected_rows = $this->deleteQuery('../client/form/domain.tform.php',$primary_id); + $affected_rows = $this->deleteQuery('../client/form/domain.tform.php', $primary_id); return $affected_rows; } -// ----------------------------------------------------------------------------------------------- + // ----------------------------------------------------------------------------------------------- public function domains_get_all_by_user($session_id, $group_id) - { - global $app; + { + global $app; if(!$this->checkPerm($session_id, 'domains_get_all_by_user')) { - throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); - return false; + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; } - $group_id = $app->functions->intval($group_id); - $sql = "SELECT domain_id, domain FROM domain WHERE sys_groupid = $group_id "; - $all = $app->db->queryAllRecords($sql); - return $all; + $group_id = $app->functions->intval($group_id); + $sql = "SELECT domain_id, domain FROM domain WHERE sys_groupid = $group_id "; + $all = $app->db->queryAllRecords($sql); + return $all; } } -?> \ No newline at end of file +?> -- Gitblit v1.9.1