From 7fe908c50c8dbc5cc05f571dbe11d66141caacd4 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Thu, 14 Nov 2013 09:01:22 -0500
Subject: [PATCH] Cleaning up code to match coding guidelines
---
interface/lib/classes/importer.inc.php | 69 ++++++++++++++++++----------------
1 files changed, 36 insertions(+), 33 deletions(-)
diff --git a/interface/lib/classes/importer.inc.php b/interface/lib/classes/importer.inc.php
index e74c099..f6cbab5 100644
--- a/interface/lib/classes/importer.inc.php
+++ b/interface/lib/classes/importer.inc.php
@@ -30,56 +30,59 @@
*/
-require_once(realpath(dirname(__FILE__)) . '/remoting.inc.php');
+require_once realpath(dirname(__FILE__)) . '/remoting.inc.php';
class fakeserver {
- private $faultMessage;
- private $faultText;
- public function fault($message = '', $text = '') {
- $this->faultMessage = $message;
- $this->faultText = $text;
- }
-
- public function getFault() {
- $ret = $this->faultMessage . ' (' . $this->faultText . ')';
- $this->faultMessage = null;
- $this->faultText = null;
- return $ret;
- }
+ private $faultMessage;
+ private $faultText;
+ public function fault($message = '', $text = '') {
+ $this->faultMessage = $message;
+ $this->faultText = $text;
+ }
+
+ public function getFault() {
+ $ret = $this->faultMessage . ' (' . $this->faultText . ')';
+ $this->faultMessage = null;
+ $this->faultText = null;
+ return $ret;
+ }
+
}
class importer extends remoting {
public function __construct()
- {
- $this->server = new fakeserver();
- }
+ {
+ $this->server = new fakeserver();
+ }
//* remote login function - overridden just to make sure it cannot be called from importer scripts
public function login($username, $password)
- {
-
+ {
+
}
-
+
//* remote logout function - overridden just to make sure it cannot be called from importer scripts
public function logout($session_id)
- {
-
+ {
+
}
-
+
public function getFault() {
- return $this->server->getFault();
- }
-
- protected function checkPerm($session_id, $function_name)
- {
- // always return true as this is used from inside the application not through remote calls
- return true;
+ return $this->server->getFault();
}
-
-
+
+ protected function checkPerm($session_id, $function_name)
+ {
+ // always return true as this is used from inside the application not through remote calls
+ return true;
+ }
+
+
protected function getSession($session_id)
- {
+ {
return array(); // we have no sessions here
}
+
}
+
?>
--
Gitblit v1.9.1