mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
fix redirect if we are within the admin directory (not /ucp.php but /{admin_directory}/index.php)
git-svn-id: file:///svn/phpbb/trunk@6314 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
cb23c1f044
commit
5fda5b4ab0
1 changed files with 9 additions and 2 deletions
|
@ -1865,8 +1865,15 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||||
if (!$redirect)
|
if (!$redirect)
|
||||||
{
|
{
|
||||||
// We just use what the session code determined...
|
// We just use what the session code determined...
|
||||||
// We do not append the phpbb_root_path directory because we are within the root dir if the redirect happens and not within the current directory.
|
// If we are not within the admin directory we use the page dir...
|
||||||
$redirect = (($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '') . $user->page['page_name'] . (($user->page['query_string']) ? '?' . $user->page['query_string'] : '');
|
$redirect = '';
|
||||||
|
|
||||||
|
if (!$admin)
|
||||||
|
{
|
||||||
|
$redirect .= ($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$redirect .= $user->page['page_name'] . (($user->page['query_string']) ? '?' . $user->page['query_string'] : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
$s_hidden_fields = build_hidden_fields(array('redirect' => $redirect, 'sid' => $user->session_id));
|
$s_hidden_fields = build_hidden_fields(array('redirect' => $redirect, 'sid' => $user->session_id));
|
||||||
|
|
Loading…
Add table
Reference in a new issue