fix for bug [ 945880 ] session expiration and logout

This commit is contained in:
Ralf Becker 2004-05-03 13:52:09 +00:00
parent d1f82e99ae
commit 5fb282b58b
2 changed files with 12 additions and 7 deletions

View File

@ -71,12 +71,12 @@
// If there is a problem, tell me and I will fix it. (jengo)
// whoooo scaring
/*
if($GLOBALS['phpgw_info']['server']['usecookies'] == True)
{
$GLOBALS['phpgw']->sessions->phpgw_setcookie('eGroupWareLoginTime', time());
}
*/
/*
if($_GET['cd'] != 10 && $GLOBALS['phpgw_info']['server']['usecookies'] == False)
{
@ -235,6 +235,11 @@
$extra_vars['cd'] = 'yes';
$forward = '/home.php';
}
else
{
list($forward,$extra_vars) = explode('?',$forward,2);
}
//echo "redirecting to ".$GLOBALS['phpgw']->link($forward,$extra_vars);
$GLOBALS['phpgw']->redirect_link($forward,$extra_vars);
}
}

View File

@ -293,12 +293,12 @@
{
if (! $GLOBALS['phpgw']->session->verify())
{
// we forward to the same place after the relogin
list(,$relpath) = explode($GLOBALS['phpgw_info']['server']['webserver_url'],$_SERVER['PHP_SELF'],2);
$args = array(
'cd' => 10,
'phpgw_forward' => urlencode('/'.$relpath.(isset($_SERVER['QUERY_STRING']) ? '?'.$_SERVER['QUERY_STRING'] : ''))
);
$GLOBALS['phpgw']->redirect_link('/login.php',$args);
// this removes the sessiondata if its saved in the URL
$query = preg_replace('/[&]?sessionid=[^&]+&kp3=[^&]+&domain=.*$/','',$_SERVER['QUERY_STRING']);
Header('Location: '.$GLOBALS['phpgw_info']['server']['webserver_url'].'/login.php?cd=10&phpgw_forward='.urlencode($relpath.(!empty($query) ? '?'.$query : '')));
exit;
}
$GLOBALS['phpgw']->datetime = CreateObject('phpgwapi.datetime');