diff options
| author | Cesar G <prototech91@gmail.com> | 2013-11-21 08:11:17 -0800 |
|---|---|---|
| committer | Cesar G <prototech91@gmail.com> | 2013-11-21 08:11:17 -0800 |
| commit | 44b6f45759485cc33bb71ff50a715f39a8d60089 (patch) | |
| tree | cf5bb1030b6cbb7fd7a745ce72e57eb3e217f63a /phpBB/viewtopic.php | |
| parent | 46994e8dfbb3a50aeeb5b02cf850f8a7630b9e95 (diff) | |
| download | forums-44b6f45759485cc33bb71ff50a715f39a8d60089.tar forums-44b6f45759485cc33bb71ff50a715f39a8d60089.tar.gz forums-44b6f45759485cc33bb71ff50a715f39a8d60089.tar.bz2 forums-44b6f45759485cc33bb71ff50a715f39a8d60089.tar.xz forums-44b6f45759485cc33bb71ff50a715f39a8d60089.zip | |
[ticket/11484] Display login box for users following email notification link.
The link used for the latest post now uses view=unread so redirecting the user
using the value for the e parameter is no longer necessary.
PHPBB3-11484
Diffstat (limited to 'phpBB/viewtopic.php')
| -rw-r--r-- | phpBB/viewtopic.php | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 3a7e633c99..fb30be5f27 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -347,23 +347,10 @@ if ($topic_data['forum_password']) login_forum_box($topic_data); } -// Redirect to login or to the correct post upon emailed notification links -if (isset($_GET['e'])) +// Redirect to login upon emailed notification links if user is not logged in. +if (isset($_GET['e']) && $user->data['user_id'] == ANONYMOUS) { - $jump_to = request_var('e', 0); - - $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"); - - if ($user->data['user_id'] == ANONYMOUS) - { - login_box($redirect_url . "&p=$post_id&e=$jump_to", $user->lang['LOGIN_NOTIFY_TOPIC']); - } - - if ($jump_to > 0) - { - // We direct the already logged in user to the correct post... - redirect($redirect_url . ((!$post_id) ? "&p=$jump_to" : "&p=$post_id") . "#p$jump_to"); - } + login_box(build_url('e') . '#unread', $user->lang['LOGIN_NOTIFY_TOPIC']); } // What is start equal to? |
