summaryrefslogtreecommitdiff
path: root/inc/auth.php
diff options
context:
space:
mode:
authorKate Arzamastseva <pshns@ukr.net>2011-08-25 15:01:15 +0300
committerKate Arzamastseva <pshns@ukr.net>2011-08-25 15:01:15 +0300
commit47e84e7a9713558efde9ea83063d3e0830651622 (patch)
tree8416e23249ee823249a98c8a0fbf88cfe26b80d7 /inc/auth.php
parent80525638759a0bfe0ca5d83d9b06430f0d94c2ac (diff)
parent1c5f7481f4e685ad3ffe9ba48ed47ed75196e64a (diff)
downloadrpg-47e84e7a9713558efde9ea83063d3e0830651622.tar.gz
rpg-47e84e7a9713558efde9ea83063d3e0830651622.tar.bz2
merging
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;