From b55e2b7e2de47e948d2899a44fb996194d193441 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 10 Aug 2011 11:12:11 -0400
Subject: [PATCH] Fix for: http://bugtracker.ispconfig.org/index.php?do=details&task_id=1671 Added destructor and session write to app class instead.
---
interface/lib/app.inc.php | 5 +++++
interface/lib/classes/db_mysql.inc.php | 4 ----
interface/web/login/logout.php | 1 +
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php
index 32b5918..fbe5bd0 100644
--- a/interface/lib/app.inc.php
+++ b/interface/lib/app.inc.php
@@ -75,6 +75,11 @@
$this->uses('auth,plugin,functions');
}
+
+ public function __destruct() {
+ session_write_close();
+ if(isset($this->db)) $this->db->closeConn();
+ }
public function uses($classes) {
$cl = explode(',', $classes);
diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php
index 4572dac..5e38e3b 100644
--- a/interface/lib/classes/db_mysql.inc.php
+++ b/interface/lib/classes/db_mysql.inc.php
@@ -54,10 +54,6 @@
//$this->connect();
}
- public function __destruct() {
- $this->closeConn();
- }
-
/** Error handler */
public function updateError($location)
{
diff --git a/interface/web/login/logout.php b/interface/web/login/logout.php
index 912a430..57b76a3 100644
--- a/interface/web/login/logout.php
+++ b/interface/web/login/logout.php
@@ -64,6 +64,7 @@
$_SESSION["s"]["user"] = null;
$_SESSION["s"]["module"] = null;
$_SESSION['s_old'] = null;
+session_write_close();
//header("Location: ../index.php?phpsessid=".$_SESSION["s"]["id"]);
--
Gitblit v1.9.1