diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-12-06 22:13:11 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-12-06 22:13:11 +0000 |
commit | b508c57b8046f7372b37e45fd993471303fcfc58 (patch) | |
tree | 20e1fe5cccadb28c594334c1585b516621180955 /phpBB/viewforum.php | |
parent | a9b2e99974398b6e88dc5a1417c0a711ec3a437c (diff) | |
download | forums-b508c57b8046f7372b37e45fd993471303fcfc58.tar forums-b508c57b8046f7372b37e45fd993471303fcfc58.tar.gz forums-b508c57b8046f7372b37e45fd993471303fcfc58.tar.bz2 forums-b508c57b8046f7372b37e45fd993471303fcfc58.tar.xz forums-b508c57b8046f7372b37e45fd993471303fcfc58.zip |
minor bugfixing
git-svn-id: file:///svn/phpbb/trunk@6719 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r-- | phpBB/viewforum.php | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 9d6da5c31c..41ed374c3b 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -241,9 +241,6 @@ $post_alt = ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->lang['FORUM_LO $s_display_active = ($forum_data['forum_type'] == FORUM_CAT && ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS)) ? true : false; $template->assign_vars(array( - 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&$u_sort_param"), $topics_count, $config['topics_per_page'], $start), - 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start), - 'TOTAL_TOPICS' => ($s_display_active) ? false : (($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count)), 'MODERATORS' => (!empty($moderators[$forum_id])) ? implode(', ', $moderators[$forum_id]) : '', 'POST_IMG' => ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', $post_alt) : $user->img('button_topic_new', $post_alt), @@ -441,6 +438,17 @@ if (sizeof($shadow_topic_list)) { $orig_topic_id = $shadow_topic_list[$row['topic_id']]; + // Do not include those topics the user has no permission to access + if (!$auth->acl_get('f_read', $row['forum_id'])) + { + // We need to remove any trace regarding this topic. :) + unset($rowset[$orig_topic_id]); + unset($topic_list[array_search($orig_topic_id, $topic_list)]); + $topics_count--; + + continue; + } + // We want to retain some values $row = array_merge($row, array( 'topic_moved_id' => $rowset[$orig_topic_id]['topic_moved_id'], @@ -453,6 +461,12 @@ if (sizeof($shadow_topic_list)) } unset($shadow_topic_list); +$template->assign_vars(array( + 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&$u_sort_param"), $topics_count, $config['topics_per_page'], $start), + 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start), + 'TOTAL_TOPICS' => ($s_display_active) ? false : (($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count))) +); + $topic_list = ($store_reverse) ? array_merge($announcement_list, array_reverse($topic_list)) : array_merge($announcement_list, $topic_list); $topic_tracking_info = $tracking_topics = array(); |