From c80e5081faeec8f3b44923997cfebde401041a8b Mon Sep 17 00:00:00 2001
From: pedro_morgan <pedro_morgan@ispconfig3>
Date: Fri, 17 Aug 2007 14:57:45 -0400
Subject: [PATCH] Restructured session start code so it doesnt check every hit, silenced some warnings
---
TODO.txt | 4 ++--
interface/lib/app.inc.php | 11 +++++------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/TODO.txt b/TODO.txt
index 7c6e6f4..246aaba 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -32,7 +32,7 @@
DNS module
--------------------------------------
-- Add some kind of whizard to create DNS records easily. The idea is to have some
+- Add some kind of wizard to create DNS records easily. The idea is to have some
kind of template(s) to create all needed A and MX records defined in the template
with one click and the user has just to enter IP, domain, nameserver and select the
template that he wants to use.
@@ -43,7 +43,7 @@
- Add a firewall configuration form. Any suggestions for a good firewall
script that runs on many linux distributions, or shall we stay with bastille
- firewall thet is used in ISPConfig 2?
+ firewall that is used in ISPConfig 2?
Clients module
diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php
index f10dfaf..a6dd033 100644
--- a/interface/lib/app.inc.php
+++ b/interface/lib/app.inc.php
@@ -44,12 +44,11 @@
}
if($conf['start_session'] == true) {
- session_start();
- $_SESSION['s']['id'] = session_id();
- if(!isset($_SESSION['s']['theme']) || $_SESSION['s']['theme'] == ''){
- $_SESSION['s']['theme'] = $conf['theme'];
- }
- if($_SESSION['s']['language'] == '') $_SESSION['s']['language'] = $conf['language'];
+ session_start();
+ //* Initialise vars if session is not set
+ if( !isset($_SESSION['s']['id']) ){
+ $_SESSION['s'] = array('id' => session_id(), 'theme' => $conf['theme'], 'language' => $conf['language']);
+ }
}
}
--
Gitblit v1.9.1