diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2004-02-02 17:20:58 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2004-02-02 17:20:58 +0000 |
commit | 6a07bc6cef95187816dc2851afb58cc0f6533bf8 (patch) | |
tree | 67ca1eca0c5bd878f5434320aed226c16a3ceff2 /phpBB/viewtopic.php | |
parent | 96cbe87fc87bb922a5baef773b22d8cc8581e6e5 (diff) | |
download | forums-6a07bc6cef95187816dc2851afb58cc0f6533bf8.tar forums-6a07bc6cef95187816dc2851afb58cc0f6533bf8.tar.gz forums-6a07bc6cef95187816dc2851afb58cc0f6533bf8.tar.bz2 forums-6a07bc6cef95187816dc2851afb58cc0f6533bf8.tar.xz forums-6a07bc6cef95187816dc2851afb58cc0f6533bf8.zip |
preserve 'jump to post'... if emailed notification link and login required.
git-svn-id: file:///svn/phpbb/trunk@4779 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r-- | phpBB/viewtopic.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index cbc2cd114b..dee7062169 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -222,9 +222,10 @@ if ($forum_password) } // Redirect to login upon emailed notification links -if (!empty($_GET['e']) && $user->data['user_id'] == ANONYMOUS) +if (isset($_GET['e']) && $user->data['user_id'] == ANONYMOUS) { - login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($_SERVER['REQUEST_URI'])), '', $user->lang['LOGIN_NOTIFY_TOPIC']); + $redirect_url = htmlspecialchars(str_replace('&e=' . $_GET['e'], '', $_SERVER['REQUEST_URI'])) . (($_GET['e']) ? '#' . (int) $_GET['e'] : ''); + login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', $redirect_url), '', $user->lang['LOGIN_NOTIFY_TOPIC']); } // Not final in the slightest! Far too simplistic |