diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-08-23 07:52:07 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-08-23 07:52:07 +0000 |
commit | 5fda5b4ab087c708963026924c7c10ce60482de7 (patch) | |
tree | 822df664a4165d2e3b5d8ea0087ad05a174d7227 /phpBB/includes/functions.php | |
parent | cb23c1f04482278a2478bdd9700503b1f1fcddf4 (diff) | |
download | forums-5fda5b4ab087c708963026924c7c10ce60482de7.tar forums-5fda5b4ab087c708963026924c7c10ce60482de7.tar.gz forums-5fda5b4ab087c708963026924c7c10ce60482de7.tar.bz2 forums-5fda5b4ab087c708963026924c7c10ce60482de7.tar.xz forums-5fda5b4ab087c708963026924c7c10ce60482de7.zip |
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
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 8affabc8c9..349719af57 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1865,8 +1865,15 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa if (!$redirect) { // 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. - $redirect = (($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '') . $user->page['page_name'] . (($user->page['query_string']) ? '?' . $user->page['query_string'] : ''); + // If we are not within the admin directory we use the page dir... + $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)); |