Skip to content

Commit 6fa4b7b

Browse files
author
pedro_morgan
committed
Minor code tidy
1 parent 8fda131 commit 6fa4b7b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

interface/web/designer/module_nav_edit.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@
3030
require_once('../../lib/config.inc.php');
3131
require_once('../../lib/app.inc.php');
3232

33-
//* Securoty checkpoint
33+
//* Security checkpoint
3434
if($_SESSION['s']['user']['typ'] != 'admin'){
3535
die('Admin permissions required.');
3636
}
3737

38-
// Checke Berechtigungen f�r Modul
39-
if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) {
40-
header("Location: ../index.php");
38+
//* Check permissions for module
39+
if(!stristr($_SESSION['s']['user']['modules'],$_SESSION['s']['module']['name'])) {
40+
header('Location: ../index.php');
4141
exit;
4242
}
4343

4444
//* Load template
4545
$app->uses('tpl');
46-
$app->tpl->newTemplate("form.tpl.htm");
47-
$app->tpl->setInclude('content_tpl','templates/module_nav_edit.htm');
46+
$app->tpl->newTemplate('form.tpl.htm');
47+
$app->tpl->setInclude('content_tpl', 'templates/module_nav_edit.htm');
4848

4949
// TODO: Check module and nav_id for malicius chars, nav_id can be empty or any number, even 0
5050
$module_name = $_REQUEST['module_name'];
@@ -70,7 +70,7 @@
7070

7171
if($error == '') {
7272

73-
$filename = "../$module_name/lib/module.conf.php";
73+
$filename = '../'.$module_name.'/lib/module.conf.php';
7474

7575
if(!@is_file($filename)){
7676
die("File not found: $filename");
@@ -104,7 +104,7 @@
104104

105105

106106
//* Jump to list
107-
header("Location: module_show.php?id=$module_name");
107+
header('Location: module_show.php?id='.urlencode($module_name));
108108
exit;
109109

110110
} else {
@@ -116,7 +116,7 @@
116116
if($nav_id != '') {
117117
//* Data record exists
118118
if($error == '') {
119-
include_once("../$module_name/lib/module.conf.php");
119+
include_once('../'.$module_name.'/lib/module.conf.php');
120120
$record = $module['nav'][$nav_id];
121121
} else {
122122
//* error

0 commit comments

Comments
 (0)