From 6a07bc6cef95187816dc2851afb58cc0f6533bf8 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 2 Feb 2004 17:20:58 +0000 Subject: preserve 'jump to post'... if emailed notification link and login required. git-svn-id: file:///svn/phpbb/trunk@4779 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'phpBB/viewtopic.php') 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 -- cgit v1.2.1