diff options
-rw-r--r-- | doku.php | 8 | ||||
-rw-r--r-- | feed.php | 5 | ||||
-rw-r--r-- | inc/common.php | 4 | ||||
-rw-r--r-- | lib/exe/ajax.php | 2 | ||||
-rw-r--r-- | lib/exe/fetch.php | 3 | ||||
-rw-r--r-- | lib/exe/media.php | 2 |
6 files changed, 22 insertions, 2 deletions
@@ -18,7 +18,6 @@ //import variables $QUERY = trim($_REQUEST['id']); -# $ID = cleanID($_REQUEST['id']); $ID = getID(); $REV = $_REQUEST['rev']; $ACT = $_REQUEST['do']; @@ -54,6 +53,13 @@ //make infos about the selected page available $INFO = pageinfo(); + //prepare breadcrumbs (initialize a static var) + breadcrumbs(); + + //close session + session_write_close(); + + //do the work act_dispatch($ACT); //restore old umask @@ -13,13 +13,16 @@ require_once(DOKU_INC.'inc/feedcreator.class.php'); require_once(DOKU_INC.'inc/auth.php'); - //set auth header for login + //set auth header for login FIXME: is this used anymore??? if($_REQUEST['login'] && !isset($_SERVER['PHP_AUTH_USER'])){ header('WWW-Authenticate: Basic realm="'.$conf['title'].'"'); header('HTTP/1.0 401 Unauthorized'); auth_logoff(); } + //close sesseion + session_write_close(); + $num = $_REQUEST['num']; $type = $_REQUEST['type']; diff --git a/inc/common.php b/inc/common.php index 80c866815..63a9f37a0 100644 --- a/inc/common.php +++ b/inc/common.php @@ -119,6 +119,10 @@ function msg($message,$lvl=0){ * @author Andreas Gohr <andi@splitbrain.org> */ function breadcrumbs(){ + // we prepare the breadcrumbs early for quick session closing + static $crumbs = null; + if($crumbs != null) return $crumbs; + global $ID; global $ACT; global $conf; diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index c75bce52d..5b0c1633e 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -16,6 +16,8 @@ require_once(DOKU_INC.'inc/init.php'); require_once(DOKU_INC.'inc/common.php'); require_once(DOKU_INC.'inc/pageutils.php'); require_once(DOKU_INC.'inc/auth.php'); +//close sesseion +session_write_close(); header('Content-Type: text/html; charset=utf-8'); diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php index 91edbd1d4..fffbf4483 100644 --- a/lib/exe/fetch.php +++ b/lib/exe/fetch.php @@ -12,6 +12,9 @@ require_once(DOKU_INC.'inc/pageutils.php'); require_once(DOKU_INC.'inc/confutils.php'); require_once(DOKU_INC.'inc/auth.php'); + //close sesseion + session_write_close(); + $mimetypes = getMimeTypes(); //get input diff --git a/lib/exe/media.php b/lib/exe/media.php index e07ecbf7c..4e193807c 100644 --- a/lib/exe/media.php +++ b/lib/exe/media.php @@ -8,6 +8,8 @@ require_once(DOKU_INC.'inc/search.php'); require_once(DOKU_INC.'inc/template.php'); require_once(DOKU_INC.'inc/auth.php'); + //close sesseion + session_write_close(); header('Content-Type: text/html; charset='.$lang['encoding']); |