diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2004-06-15 17:56:37 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2004-06-15 17:56:37 +0000 |
| commit | 8022b6f6b21017d2016121c41f48a15fdbc9a404 (patch) | |
| tree | 04703322b631b28a20c27e9fb6f634fdaa8be55a /phpBB/viewtopic.php | |
| parent | 6aa372226e045b7db68d7066f60dba50151c1f60 (diff) | |
| download | forums-8022b6f6b21017d2016121c41f48a15fdbc9a404.tar forums-8022b6f6b21017d2016121c41f48a15fdbc9a404.tar.gz forums-8022b6f6b21017d2016121c41f48a15fdbc9a404.tar.bz2 forums-8022b6f6b21017d2016121c41f48a15fdbc9a404.tar.xz forums-8022b6f6b21017d2016121c41f48a15fdbc9a404.zip | |
- fixed notification redirection
- added SID to ucp redirects
git-svn-id: file:///svn/phpbb/trunk@4915 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
| -rw-r--r-- | phpBB/viewtopic.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 3040857c49..77a5d43faa 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -268,15 +268,17 @@ if ($forum_password) if (isset($_GET['e'])) { $jump_to = (int) $_GET['e']; - $redirect_url = htmlspecialchars(str_replace('&e=' . $jump_to, '', $_SERVER['REQUEST_URI'])) . (($jump_to) ? '#' . $jump_to : ''); + + $redirect_url = str_replace('&e=' . $jump_to, '', $_SERVER['REQUEST_URI']) . (($jump_to) ? '#' . $jump_to : ''); + if ($user->data['user_id'] == ANONYMOUS) { - login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', $redirect_url), '', $user->lang['LOGIN_NOTIFY_TOPIC']); + login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($redirect_url)), '', $user->lang['LOGIN_NOTIFY_TOPIC']); } else if ($jump_to > 0) { // We direct the already logged in user to the correct post... - redirect($redirect_url); + redirect(preg_replace('#^' . $config['script_path'] . '#', '', $redirect_url)); } } |
