mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-19 09:48:53 +00:00
fixed admin redirection error (/phpBB2/phpBB2).
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3987 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
f0b11044b1
commit
ba013ea84c
1 changed files with 4 additions and 2 deletions
|
@ -49,10 +49,12 @@ else if ($userdata['user_level'] != ADMIN)
|
|||
|
||||
if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
|
||||
{
|
||||
$url = preg_replace('/sid=([^&]*)(&?)/i', '', $HTTP_SERVER_VARS['REQUEST_URI']);
|
||||
$url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])), '', $HTTP_SERVER_VARS['REQUEST_URI']);
|
||||
$url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])), '', $url);
|
||||
$url = str_replace('//', '/', $url);
|
||||
$url = preg_replace('/sid=([^&]*)(&?)/i', '', $url);
|
||||
$url = preg_replace('/\?$/', '', $url);
|
||||
$url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id'];
|
||||
|
||||
redirect($url);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue