diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2011-11-11 14:11:00 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2011-11-11 14:11:00 +0100 |
commit | 6a379f1a55eaaf4a32ab357bd9a69bfee2e6d069 (patch) | |
tree | 98dd995ea030bf6dda72bb316c56eb2ea5c95a11 /phpBB/viewforum.php | |
parent | 72a3bcd0484460d2aeb5610762e162ca30f24263 (diff) | |
download | forums-6a379f1a55eaaf4a32ab357bd9a69bfee2e6d069.tar forums-6a379f1a55eaaf4a32ab357bd9a69bfee2e6d069.tar.gz forums-6a379f1a55eaaf4a32ab357bd9a69bfee2e6d069.tar.bz2 forums-6a379f1a55eaaf4a32ab357bd9a69bfee2e6d069.tar.xz forums-6a379f1a55eaaf4a32ab357bd9a69bfee2e6d069.zip |
[ticket/10435] Remove global announcement from forums total topic count
We need to remove the global announcements from the forums total topic count,
otherwise the number is different from the one on the forum list.
PHPBB3-10435
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r-- | phpBB/viewforum.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 62cf939545..0f17fb340f 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -561,6 +561,9 @@ if (sizeof($shadow_topic_list)) } unset($shadow_topic_list); +// We need to remove the global announcements from the forums total topic count, otherwise the number is different from the one on the forum list +$total_topics_count = $topics_count - sizeof($global_announce_forums); + // Ok, adjust topics count for active topics list if ($s_display_active) { @@ -570,7 +573,7 @@ if ($s_display_active) $template->assign_vars(array( 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$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))) + 'TOTAL_TOPICS' => ($s_display_active) ? false : (($total_topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $total_topics_count))) ); $topic_list = ($store_reverse) ? array_merge($announcement_list, array_reverse($topic_list)) : array_merge($announcement_list, $topic_list); |