From 72b3d6ca787a4b7004093c7d339a2d63bcb3d307 Mon Sep 17 00:00:00 2001 From: David M Date: Thu, 29 Dec 2005 16:57:56 +0000 Subject: [PATCH] Bug Spray! - No longer asks a user to login to a passworded forum even though his auth is not high enough, it just rejects the user now. git-svn-id: file:///svn/phpbb/trunk@5394 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewforum.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index b72bb39336..0da0ba9394 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -71,6 +71,23 @@ if (!($forum_data = $db->sql_fetchrow($result))) } $db->sql_freeresult($result); +// Redirect to login upon emailed notification links +if (isset($_GET['e']) && !$user->data['is_registered']) +{ + login_box('', $user->lang['LOGIN_NOTIFY_FORUM']); +} + +// Permissions check +if (!$auth->acl_get('f_read', $forum_id)) +{ + if ($user->data['user_id'] != ANONYMOUS) + { + trigger_error($user->lang['SORRY_AUTH_READ']); + } + + login_box('', $user->lang['LOGIN_VIEWFORUM']); +} + // Is this forum a link? ... User got here either because the // number of clicks is being tracked or they guessed the id if ($forum_data['forum_link']) @@ -97,23 +114,6 @@ if ($forum_data['forum_password']) login_forum_box($forum_data); } -// Redirect to login upon emailed notification links -if (isset($_GET['e']) && !$user->data['is_registered']) -{ - login_box('', $user->lang['LOGIN_NOTIFY_FORUM']); -} - -// Permissions check -if (!$auth->acl_get('f_read', $forum_id)) -{ - if ($user->data['user_id'] != ANONYMOUS) - { - trigger_error($user->lang['SORRY_AUTH_READ']); - } - - login_box('', $user->lang['LOGIN_VIEWFORUM']); -} - // Build navigation links generate_forum_nav($forum_data);