Skip to content

Commit c80e508

Browse files
author
pedro_morgan
committed
Restructured session start code so it doesnt check every hit, silenced some warnings
1 parent 60013af commit c80e508

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

TODO.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Mail module
3232
DNS module
3333
--------------------------------------
3434

35-
- Add some kind of whizard to create DNS records easily. The idea is to have some
35+
- Add some kind of wizard to create DNS records easily. The idea is to have some
3636
kind of template(s) to create all needed A and MX records defined in the template
3737
with one click and the user has just to enter IP, domain, nameserver and select the
3838
template that he wants to use.
@@ -43,7 +43,7 @@ Administration module
4343

4444
- Add a firewall configuration form. Any suggestions for a good firewall
4545
script that runs on many linux distributions, or shall we stay with bastille
46-
firewall thet is used in ISPConfig 2?
46+
firewall that is used in ISPConfig 2?
4747

4848

4949
Clients module

interface/lib/app.inc.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,11 @@ public function __construct() {
4444
}
4545

4646
if($conf['start_session'] == true) {
47-
session_start();
48-
$_SESSION['s']['id'] = session_id();
49-
if(!isset($_SESSION['s']['theme']) || $_SESSION['s']['theme'] == ''){
50-
$_SESSION['s']['theme'] = $conf['theme'];
51-
}
52-
if($_SESSION['s']['language'] == '') $_SESSION['s']['language'] = $conf['language'];
47+
session_start();
48+
//* Initialise vars if session is not set
49+
if( !isset($_SESSION['s']['id']) ){
50+
$_SESSION['s'] = array('id' => session_id(), 'theme' => $conf['theme'], 'language' => $conf['language']);
51+
}
5352
}
5453
}
5554

0 commit comments

Comments
 (0)