From e71ce681bdae620477f46591279412a0143b6b0e Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 3 Oct 2006 14:15:46 +0200 Subject: use DOKU_URL as key for sessions and auth cookie #896 #581 #884 This patch changes the DOKU_COOKIE define to be based on the DOKU_URL define. DOKU_COOKIE is now used as session key as well, making sessions no longer dependend on the title option. This should fix problems with multiple wikis on the same host (using the same title) and wikis accessed through different URLs. darcs-hash:20061003121546-7ad00-aea4c256b7752815ed422ce74a659152a601d267.gz --- inc/common.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'inc/common.php') diff --git a/inc/common.php b/inc/common.php index f42ddb1e5..88891af74 100644 --- a/inc/common.php +++ b/inc/common.php @@ -183,7 +183,7 @@ function breadcrumbs(){ global $ID; global $ACT; global $conf; - $crumbs = $_SESSION[$conf['title']]['bc']; + $crumbs = $_SESSION[DOKU_COOKIE]['bc']; //first visit? if (!is_array($crumbs)){ @@ -192,7 +192,7 @@ function breadcrumbs(){ //we only save on show and existing wiki documents $file = wikiFN($ID); if($ACT != 'show' || !@file_exists($file)){ - $_SESSION[$conf['title']]['bc'] = $crumbs; + $_SESSION[DOKU_COOKIE]['bc'] = $crumbs; return $crumbs; } @@ -218,7 +218,7 @@ function breadcrumbs(){ array_shift($crumbs); } //save to session - $_SESSION[$conf['title']]['bc'] = $crumbs; + $_SESSION[DOKU_COOKIE]['bc'] = $crumbs; return $crumbs; } -- cgit v1.2.3