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