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/web/content.php | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/interface/web/content.php b/interface/web/content.php
index 52ea216..ea23f5a 100644
--- a/interface/web/content.php
+++ b/interface/web/content.php
@@ -28,8 +28,8 @@
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-require_once('../lib/config.inc.php');
-require_once('../lib/app.inc.php');
+require_once '../lib/config.inc.php';
+require_once '../lib/app.inc.php';
/*
$module = $_REQUEST["s_mod"];
@@ -43,36 +43,36 @@
if(!preg_match("/^[a-z]{2,20}$/i", $page)) die('page name contains unallowed chars.');
if(is_file(ISPC_WEB_PATH."/$module/$page.php")) {
-
- include_once(ISPC_WEB_PATH."/$module/$page.php");
+
+ include_once ISPC_WEB_PATH."/$module/$page.php";
$classname = $module.'_'.$page;
$page = new $classname();
-
+
$content = $page->render();
if($page->status == 'OK') {
echo $content;
} elseif($page->status == 'REDIRECT') {
- $target_parts = explode(':',$page->target);
+ $target_parts = explode(':', $page->target);
$module = $target_parts[0];
$page = $target_parts[1];
if(!preg_match("/^[a-z]{2,20}$/i", $module)) die('target module name contains unallowed chars.');
if(!preg_match("/^[a-z]{2,20}$/i", $page)) die('target page name contains unallowed chars.');
-
+
if(is_file(ISPC_WEB_PATH."/$module/$page.php")) {
- include_once(ISPC_WEB_PATH."/$module/$page.php");
-
+ include_once ISPC_WEB_PATH."/$module/$page.php";
+
$classname = $module.'_'.$page;
$page = new $classname();
-
+
$content = $page->render();
if($page->status == 'OK') {
echo $content;
}
}
-
+
}
-
+
} elseif (is_array($_SESSION["s"]['user']) or is_array($_SESSION["s"]["module"])) {
// If the user is logged in, we try to load the default page of the module
die('- error -');
@@ -80,4 +80,4 @@
die('Page does not exist.');
}
-?>
\ No newline at end of file
+?>
--
Gitblit v1.9.1