Skip to content

Commit b2ba0d7

Browse files
author
Marius Burkard
committed
- Fixed start module display
- Fixed mailuser login
1 parent b2cee83 commit b2ba0d7

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

interface/web/index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
$app->uses('tpl');
4343
$app->tpl->newTemplate('main.tpl.htm');
44+
$app->tpl->setVar('startpage', isset($_SESSION['s']['module']['startpage']) ? $_SESSION['s']['module']['startpage'] : '');
4445
$app->tpl->setVar('logged_in', ($_SESSION['s']['user']['active'] != 1 ? 'n' : 'y'));
4546

4647
// tab change warning?

interface/web/login/index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@
217217
$_SESSION['s']['language'] = $user['language'];
218218
$_SESSION["s"]['theme'] = $_SESSION['s']['user']['theme'];
219219

220-
if(is_file($_SESSION['s']['user']['startmodule'].'/lib/module.conf.php')) {
221-
include_once $_SESSION['s']['user']['startmodule'].'/lib/module.conf.php';
220+
if(is_file(ISPC_WEB_PATH . '/' . $_SESSION['s']['user']['startmodule'].'/lib/module.conf.php')) {
221+
include_once ISPC_WEB_PATH . '/' . $_SESSION['s']['user']['startmodule'].'/lib/module.conf.php';
222222
$menu_dir = ISPC_WEB_PATH.'/' . $_SESSION['s']['user']['startmodule'] . '/lib/menu.d';
223223
if (is_dir($menu_dir)) {
224224
if ($dh = opendir($menu_dir)) {
@@ -260,7 +260,7 @@
260260
echo 'LOGIN_REDIRECT:'.$_SESSION['s']['module']['startpage'];
261261
exit;
262262
} else {
263-
header('Location: /index.php?phpsessid='.session_id());
263+
header('Location: /index.php');
264264
die();
265265
}
266266
}

interface/web/themes/default/assets/javascripts/ispconfig.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,11 @@ var ISPConfig = {
364364
},
365365

366366
loadInitContent: function() {
367+
var startpage = $('#pageContent').attr('data-startpage');
368+
if(!startpage) startpage = 'dashboard/dashboard.php';
367369
var pageContentObject = $.ajax({
368370
type: "GET",
369-
url: "dashboard/dashboard.php",
371+
url: startpage,
370372
data: "",
371373
dataType: "html",
372374
beforeSend: function() {

interface/web/themes/default/assets/javascripts/ispconfig.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

interface/web/themes/default/templates/main.tpl.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<!-- content -->
6868
<div id='content' class='right'>
6969
<form method="post" action="" id="pageForm" name="pageForm" enctype="multipart/form-data" class='form-horizontal' role='form'>
70-
<div id="pageContent"><!-- AJAX CONTENT --></div>
70+
<div id="pageContent" data-startpage="{tmpl_var name="startpage"}"><!-- AJAX CONTENT --></div>
7171
</form>
7272
</div>
7373
<!-- news sidebar -->

0 commit comments

Comments
 (0)