From e975227cffd51f6243891f679ee301edf0941907 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Mon, 17 Mar 2003 00:53:38 +0000 Subject: Moved login procedure to a function enabling "inline" login links ... no more "messy" redirects ... install will be broken for now, at least when it comes to redirecting after completion. Moved "front-end" login to ucp.php git-svn-id: file:///svn/phpbb/trunk@3650 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index ea1b413003..e7db9dd029 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -173,14 +173,12 @@ extract($topic_data); // Start auth check if (!$auth->acl_gets('f_read', 'm_', 'a_', $forum_id)) { - if ($user->data['user_id'] == ANONYMOUS) + if ($user->data['user_id'] != ANONYMOUS) { - $redirect = (isset($post_id)) ? "p=$post_id" : "t=$topic_id"; - $redirect .= (isset($start)) ? "&start=$start" : ''; - redirect('login.' . $phpEx . $SID . '&redirect=viewtopic.' . $phpEx . '&' . $redirect); + trigger_error($user->lang['SORRY_AUTH_READ']); } - trigger_error($user->lang['SORRY_AUTH_READ']); + login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($_SERVER['REQUEST_URI'])), '', $user->lang['LOGIN_VIEWFORUM']); } -- cgit v1.2.1