diff options
-rw-r--r-- | boot.php | 1 | ||||
-rw-r--r-- | include/dba.php | 11 | ||||
-rw-r--r-- | index.php | 1 |
3 files changed, 12 insertions, 1 deletions
@@ -989,6 +989,7 @@ function autoname($len) { if(! function_exists('killme')) { function killme() { session_write_close(); + closedb(); exit; }} diff --git a/include/dba.php b/include/dba.php index 49b325cf7..32f1ac3ed 100644 --- a/include/dba.php +++ b/include/dba.php @@ -212,4 +212,13 @@ function dbesc_array(&$arr) { if(is_array($arr) && count($arr)) { array_walk($arr,'dbesc_array_cb'); } -}}
\ No newline at end of file +}} + + +if(! function_exists('closedb')) { +function closedb() { + global $db; + if($db && $db->connected) + $db->close(); +}} + @@ -326,4 +326,5 @@ else require_once(str_replace($lang . '/', '', $template)); session_write_close(); +closedb(); exit; |