From 9ab254b6eb05ada78e288ed8b7df5717412e94ec Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Mon, 4 Mar 2002 00:59:29 +0000 Subject: [PATCH] re-add check for cookie setting --- logout.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/logout.php b/logout.php index e80c05694c..41c7a312fe 100755 --- a/logout.php +++ b/logout.php @@ -27,14 +27,14 @@ $GLOBALS['kp3'] = $GLOBALS['HTTP_GET_VARS']['kp3'] ? $GLOBALS['HTTP_GET_VARS']['kp3'] : $GLOBALS['HTTP_COOKIE_VARS']['kp3']; $verified = $GLOBALS['phpgw']->session->verify(); - if ($verified) + if($verified) { - if (file_exists($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid'])) + if(file_exists($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid'])) { $dh = opendir($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']); - while ($file = readdir($dh)) + while($file = readdir($dh)) { - if ($file != '.' && $file != '..') + if($file != '.' && $file != '..') { unlink($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid'] . SEP . $file); } @@ -55,9 +55,13 @@ )); } } - Setcookie('sessionid'); - Setcookie('kp3'); - Setcookie('domain'); + + if($GLOBALS['phpgw_info']['server']['usecookies']) + { + Setcookie('sessionid'); + Setcookie('kp3'); + Setcookie('domain'); + } $GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'].'/login.php?cd=1'); ?>