diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/functions_display.php | 2 | ||||
-rw-r--r-- | phpBB/language/en/acp/permissions_phpbb.php | 1 | ||||
-rw-r--r-- | phpBB/language/en/viewforum.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/permissions.php | 1 | ||||
-rw-r--r-- | phpBB/viewforum.php | 12 |
5 files changed, 10 insertions, 8 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 32bee14eef..171a73a8de 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -537,7 +537,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod // Create last post link information, if appropriate if ($row['forum_last_post_id']) { - if ($row['forum_password_last_post'] === '' && $auth->acl_get('f_read', $row['forum_id_last_post'])) + if ($row['forum_password_last_post'] === '' && $auth->acl_gets('f_read', 'f_list_topics', $row['forum_id_last_post'])) { $last_post_subject = censor_text($row['forum_last_post_subject']); $last_post_subject_truncated = truncate_string($last_post_subject, 30, 255, false, $user->lang['ELLIPSIS']); diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php index f986eced38..64740b311b 100644 --- a/phpBB/language/en/acp/permissions_phpbb.php +++ b/phpBB/language/en/acp/permissions_phpbb.php @@ -107,6 +107,7 @@ $lang = array_merge($lang, array( // Forum Permissions $lang = array_merge($lang, array( 'ACL_F_LIST' => 'Can see forum', + 'ACL_F_LIST_TOPICS' => 'Can see topics', 'ACL_F_READ' => 'Can read forum', 'ACL_F_SEARCH' => 'Can search the forum', 'ACL_F_SUBSCRIBE' => 'Can subscribe forum', diff --git a/phpBB/language/en/viewforum.php b/phpBB/language/en/viewforum.php index 9946a3eda4..cab205ddf9 100644 --- a/phpBB/language/en/viewforum.php +++ b/phpBB/language/en/viewforum.php @@ -53,7 +53,7 @@ $lang = array_merge($lang, array( 'NEW_POSTS_LOCKED' => 'New posts [ Locked ]', // Not used anymore 'NO_NEW_POSTS_HOT' => 'No new posts [ Popular ]', // Not used anymore 'NO_NEW_POSTS_LOCKED' => 'No new posts [ Locked ]', // Not used anymore - 'NO_READ_ACCESS' => 'You do not have the required permissions to read topics within this forum.', + 'NO_READ_ACCESS' => 'You do not have the required permissions to view or read topics within this forum.', 'NO_UNREAD_POSTS_HOT' => 'No unread posts [ Popular ]', 'NO_UNREAD_POSTS_LOCKED' => 'No unread posts [ Locked ]', diff --git a/phpBB/phpbb/permissions.php b/phpBB/phpbb/permissions.php index c9181e6202..7697884b6a 100644 --- a/phpBB/phpbb/permissions.php +++ b/phpBB/phpbb/permissions.php @@ -260,6 +260,7 @@ class permissions // Forum Permissions 'f_list' => array('lang' => 'ACL_F_LIST', 'cat' => 'actions'), + 'f_list_topics' => array('lang' => 'ACL_F_LIST_TOPICS', 'cat' => 'actions'), 'f_read' => array('lang' => 'ACL_F_READ', 'cat' => 'actions'), 'f_search' => array('lang' => 'ACL_F_SEARCH', 'cat' => 'actions'), 'f_subscribe' => array('lang' => 'ACL_F_SUBSCRIBE', 'cat' => 'actions'), diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 9cc75988f7..6b561dd3b2 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -87,7 +87,7 @@ if (isset($_GET['e']) && !$user->data['is_registered']) } // Permissions check -if (!$auth->acl_gets('f_list', 'f_read', $forum_id) || ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'] && !$auth->acl_get('f_read', $forum_id))) +if (!$auth->acl_gets('f_list', 'f_list_topics', 'f_read', $forum_id) || ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'] && !$auth->acl_get('f_read', $forum_id))) { if ($user->data['user_id'] != ANONYMOUS) { @@ -181,7 +181,7 @@ if (!($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] & // Ok, if someone has only list-access, we only display the forum list. // We also make this circumstance available to the template in case we want to display a notice. ;) -if (!$auth->acl_get('f_read', $forum_id)) +if (!$auth->acl_gets('f_read', 'f_list_topics', $forum_id)) { $template->assign_vars(array( 'S_NO_READ_ACCESS' => true, @@ -732,7 +732,7 @@ if (sizeof($shadow_topic_list)) } // Do not include those topics the user has no permission to access - if (!$auth->acl_get('f_read', $row['forum_id'])) + if (!$auth->acl_gets('f_read', 'f_list_topics', $row['forum_id'])) { // We need to remove any trace regarding this topic. :) unset($rowset[$orig_topic_id]); @@ -875,7 +875,7 @@ if (sizeof($topic_list)) // Generate all the URIs ... $view_topic_url_params = 'f=' . $row['forum_id'] . '&t=' . $topic_id; - $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params); + $view_topic_url = $auth->acl_get('f_read', $forum_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params) : false; $topic_unapproved = (($row['topic_visibility'] == ITEM_UNAPPROVED || $row['topic_visibility'] == ITEM_REAPPROVE) && $auth->acl_get('m_approve', $row['forum_id'])); $posts_unapproved = ($row['topic_visibility'] == ITEM_APPROVED && $row['topic_posts_unapproved'] && $auth->acl_get('m_approve', $row['forum_id'])); @@ -929,8 +929,8 @@ if (sizeof($topic_list)) 'S_TOPIC_LOCKED' => ($row['topic_status'] == ITEM_LOCKED) ? true : false, 'S_TOPIC_MOVED' => ($row['topic_status'] == ITEM_MOVED) ? true : false, - 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&view=unread') . '#unread', - 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'], + 'U_NEWEST_POST' => $auth->acl_get('f_read', $forum_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&view=unread') . '#unread' : false, + 'U_LAST_POST' => $auth->acl_get('f_read', $forum_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'] : false, 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'U_VIEW_TOPIC' => $view_topic_url, |