"only add \"your session could not be verified\", if a sessionid is given (cookie or on url)"

This commit is contained in:
Ralf Becker 2010-05-11 16:22:02 +00:00
parent fc52dfa528
commit 6785a48dff

View File

@ -290,9 +290,18 @@ class egw extends egw_minimal
}
// this removes the sessiondata if its saved in the URL
$query = preg_replace('/[&]?sessionid(=|%3D)[^&]+&kp3(=|%3D)[^&]+&domain=.*$/','',$_SERVER['QUERY_STRING']);
$redirect = '/login.php?cd=10&';
if ($GLOBALS['egw_info']['server']['http_auth_types']) $redirect = '/phpgwapi/ntlm/index.php?';
Header('Location: '.$GLOBALS['egw_info']['server']['webserver_url'].$redirect.'phpgw_forward='.urlencode($relpath.(!empty($query) ? '?'.$query : '')));
if ($GLOBALS['egw_info']['server']['http_auth_types'])
{
$redirect = '/phpgwapi/ntlm/index.php?';
}
else
{
$redirect = '/login.php?';
// only add "your session could not be verified", if a sessionid is given (cookie or on url)
if (egw_session::get_sessionid()) $redirect .= 'cd=10&';
}
if ($relpath) $redirect .= 'phpgw_forward='.urlencode($relpath.(!empty($query) ? '?'.$query : ''));
Header('Location: '.$GLOBALS['egw_info']['server']['webserver_url'].$redirect);
exit;
}
}