1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-13 20:28:44 +01:00

preserve 'jump to post'... if emailed notification link and login required.

git-svn-id: file:///svn/phpbb/trunk@4779 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2004-02-02 17:20:58 +00:00
parent 96cbe87fc8
commit 6a07bc6cef
2 changed files with 6 additions and 5 deletions

View File

@ -1321,9 +1321,9 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
'TOPIC_TITLE' => $topic_title,
'FORUM_NAME' => $forum_name,
'U_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id&e=1",
'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&e=1",
'U_NEWEST_POST' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&p=$post_id&e=1#$post_id",
'U_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id&e=0",
'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&e=0",
'U_NEWEST_POST' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&p=$post_id&e=$post_id",
'U_STOP_WATCHING_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&unwatch=topic",
'U_STOP_WATCHING_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id&unwatch=forum",
));

View File

@ -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