From 3c8e36b458742116a41f90421e20251df97c528c Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 1 Sep 2004 08:42:12 +0000 Subject: [PATCH] - now notification redirection working... ?! git-svn-id: file:///svn/phpbb/trunk@4969 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 301a9b05b3..56e4bf2a22 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -258,7 +258,7 @@ if (!$auth->acl_get('f_read', $forum_id)) trigger_error($user->lang['SORRY_AUTH_READ']); } - login_box($user->cur_page, '', $user->lang['LOGIN_VIEWFORUM']); + login_box($user->cur_page, '', $user->lang['LOGIN_VIEWTOPIC']); } // Forum is passworded ... check whether access has been granted to this @@ -272,17 +272,16 @@ if ($forum_password) if (isset($_GET['e'])) { $jump_to = (int) $_GET['e']; - - $redirect_url = str_replace('&e=' . $jump_to, '', $_SERVER['REQUEST_URI']) . (($jump_to) ? '#' . $jump_to : ''); + $redirect_url = "{$phpbb_root_path}viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id"; if ($user->data['user_id'] == ANONYMOUS) { - login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($redirect_url)), '', $user->lang['LOGIN_NOTIFY_TOPIC']); + login_box($redirect_url . "&p=$post_id&e=$jump_to", '', $user->lang['LOGIN_NOTIFY_TOPIC']); } else if ($jump_to > 0) { // We direct the already logged in user to the correct post... - redirect(preg_replace('#^' . $config['script_path'] . '#', '', $redirect_url)); + redirect($redirect_url . ((!$post_id) ? "&p=$jump_to" : "&p=$post_id") . "#$jump_to"); } }