Skip to content

Commit b55e2b7

Browse files
committed
Added destructor and session write to app class instead.
1 parent 552714c commit b55e2b7

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

interface/lib/app.inc.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ public function __construct() {
7575

7676
$this->uses('auth,plugin,functions');
7777
}
78+
79+
public function __destruct() {
80+
session_write_close();
81+
if(isset($this->db)) $this->db->closeConn();
82+
}
7883

7984
public function uses($classes) {
8085
$cl = explode(',', $classes);

interface/lib/classes/db_mysql.inc.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ public function __construct()
5454
//$this->connect();
5555
}
5656

57-
public function __destruct() {
58-
$this->closeConn();
59-
}
60-
6157
/** Error handler */
6258
public function updateError($location)
6359
{

interface/web/login/logout.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
$_SESSION["s"]["user"] = null;
6565
$_SESSION["s"]["module"] = null;
6666
$_SESSION['s_old'] = null;
67+
session_write_close();
6768

6869
//header("Location: ../index.php?phpsessid=".$_SESSION["s"]["id"]);
6970

0 commit comments

Comments
 (0)