summaryrefslogtreecommitdiff
path: root/inc/auth.php
diff options
context:
space:
mode:
authorlupo49 <post@lupo49.de>2011-08-22 19:11:18 +0200
committerlupo49 <post@lupo49.de>2011-08-22 19:11:18 +0200
commitd8f231b5162801fe333f899552b5808a83282634 (patch)
treef8021011b52502521eeff4f33e368628bb73ba89 /inc/auth.php
parent8e5a3957cd8de15f48dc27e9c07dfe4033fd6997 (diff)
parent1c5f7481f4e685ad3ffe9ba48ed47ed75196e64a (diff)
downloadrpg-d8f231b5162801fe333f899552b5808a83282634.tar.gz
rpg-d8f231b5162801fe333f899552b5808a83282634.tar.bz2
Merge remote branch 'upstream/master'
Diffstat (limited to 'inc/auth.php')
-rw-r--r--inc/auth.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/inc/auth.php b/inc/auth.php
index a480a4a8a..eff984b36 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -348,10 +348,11 @@ function auth_logoff($keepbc=false){
unset($_SERVER['REMOTE_USER']);
$USERINFO=null; //FIXME
+ $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'];
if (version_compare(PHP_VERSION, '5.2.0', '>')) {
- setcookie(DOKU_COOKIE,'',time()-600000,DOKU_REL,'',($conf['securecookie'] && is_ssl()),true);
+ setcookie(DOKU_COOKIE,'',time()-600000,$cookieDir,'',($conf['securecookie'] && is_ssl()),true);
}else{
- setcookie(DOKU_COOKIE,'',time()-600000,DOKU_REL,'',($conf['securecookie'] && is_ssl()));
+ setcookie(DOKU_COOKIE,'',time()-600000,$cookieDir,'',($conf['securecookie'] && is_ssl()));
}
if($auth) $auth->logOff();
@@ -977,11 +978,12 @@ function auth_setCookie($user,$pass,$sticky) {
// set cookie
$cookie = base64_encode($user).'|'.((int) $sticky).'|'.base64_encode($pass);
+ $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'];
$time = $sticky ? (time()+60*60*24*365) : 0; //one year
if (version_compare(PHP_VERSION, '5.2.0', '>')) {
- setcookie(DOKU_COOKIE,$cookie,$time,DOKU_REL,'',($conf['securecookie'] && is_ssl()),true);
+ setcookie(DOKU_COOKIE,$cookie,$time,$cookieDir,'',($conf['securecookie'] && is_ssl()),true);
}else{
- setcookie(DOKU_COOKIE,$cookie,$time,DOKU_REL,'',($conf['securecookie'] && is_ssl()));
+ setcookie(DOKU_COOKIE,$cookie,$time,$cookieDir,'',($conf['securecookie'] && is_ssl()));
}
// set session
$_SESSION[DOKU_COOKIE]['auth']['user'] = $user;