Browse Source

Only close the session if it had been opened.

tags/3.5
Michael Vogel 4 years ago
parent
commit
1bfdc216d0
3 changed files with 7 additions and 4 deletions
  1. +3
    -1
      boot.php
  2. +4
    -2
      index.php
  3. +0
    -1
      mod/hostxrd.php

+ 3
- 1
boot.php View File

@@ -1698,7 +1698,9 @@ function login($register = false, $hiddens=false) {
* @brief Used to end the current process, after saving session state.
*/
function killme() {
session_write_close();
if (!get_app()->is_backend())
session_write_close();

exit;
}



+ 4
- 2
index.php View File

@@ -489,7 +489,8 @@ if (isset($_GET["mode"]) AND ($_GET["mode"] == "raw")) {

echo substr($target->saveHTML(), 6, -8);

session_write_close();
if (!$a->is_backend())
session_write_close();
exit;

}
@@ -514,5 +515,6 @@ if(!$template) {

require_once($template);

session_write_close();
if (!$a->is_backend())
session_write_close();
exit;

+ 0
- 1
mod/hostxrd.php View File

@@ -25,7 +25,6 @@ function hostxrd_init(&$a) {
'$zot_post' => z_root() . '/post',
'$bigkey' => salmon_key(get_config('system','site_pubkey')),
));
session_write_close();
exit();

}

Loading…
Cancel
Save