forked from extern/egroupware
fix for bug [ 945880 ] session expiration and logout
This commit is contained in:
parent
d1f82e99ae
commit
5fb282b58b
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user