Skip to content

Commit c283150

Browse files
committed
Removed unneeded code in login/index.php
Added a variable check in app.inc.php
1 parent 7374887 commit c283150

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

interface/lib/app.inc.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,10 @@ public function tpl_defaults()
165165
}
166166
$this->tpl->setVar('app_title', $this->_conf['app_title']);
167167
$this->tpl->setVar('delete_confirmation', $this->lng('delete_confirmation'));
168-
//TODO: Silence this notice
169168
//print_r($_SESSION);
170-
$this->tpl->setVar('app_module', $_SESSION['s']['module']['name']);
169+
if(isset($_SESSION['s']['module']['name'])) {
170+
$this->tpl->setVar('app_module', $_SESSION['s']['module']['name']);
171+
}
171172
if(isset($_SESSION['s']['user']) && $_SESSION['s']['user']['typ'] == 'admin') {
172173
$this->tpl->setVar('is_admin', 1);
173174
}

interface/web/login/index.php

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ public function render() {
4747
$error = '';
4848

4949

50-
//* Login Formular wurde abgesandt
50+
//* Login Form was send
5151
if(count($_POST) > 0) {
52-
//die('Hier');
53-
// importiere Variablen
52+
53+
// iporting variables
5454
$username = $app->db->quote($_POST['username']);
5555
$passwort = $app->db->quote($_POST['passwort']);
5656

@@ -69,20 +69,6 @@ public function render() {
6969
include_once($_SESSION['s']['user']['startmodule'].'/lib/module.conf.php');
7070
$_SESSION['s']['module'] = $module;
7171
}
72-
73-
// TODO: What is all this - pedro
74-
//$site = $app->db->queryOneRecord("SELECT * FROM mb_sites WHERE name = '".$user["site_preset"]."'");
75-
//$_SESSION["s"]["site"] = $site;
76-
77-
//header ("HTTP/1.0 307 Temporary redirect");
78-
//header("Location: http://localhost:8080/ispconfig3_export/interface/web/admin/index.php");
79-
80-
/*header("Location: ../capp.php?mod=".$user["startmodule"]."&phpsessid=".$_SESSION["s"]["id"]);*/
81-
//header('Content-type: text/javascript');
82-
/*echo "<script language=\"javascript\" type=\"text/javascript\">loadContent('admin/users_list.php','')</script>";*/
83-
//$this->status = 'REDIRECT';
84-
//$this->target = 'admin:index';
85-
//return '';
8672

8773
echo 'HEADER_REDIRECT:'.$_SESSION['s']['module']['startpage'];
8874
//echo 'HEADER_REDIRECT:content.php?s_mod=admin&s_pg=index';
@@ -113,7 +99,6 @@ public function render() {
11399
$app->tpl->setVar('error', $error);
114100
$app->tpl->setInclude('content_tpl','login/templates/index.htm');
115101
$app->tpl_defaults();
116-
//$app->tpl->pparse();
117102

118103
$this->status = 'OK';
119104

0 commit comments

Comments
 (0)