diff options
author | Andreas Fischer <bantu@phpbb.com> | 2011-11-13 14:13:42 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-11-13 14:13:42 +0100 |
commit | 2d989d4322be484e4d855ad650b9f5e606e690b8 (patch) | |
tree | 44faf13073e9129eb607882426b625ff75e6febf /phpBB/viewforum.php | |
parent | f3c9133a6c4f3a5abe465991a825f170e495a604 (diff) | |
parent | 0d3e9bf446f93afcb4537d561de665c678a44c2a (diff) | |
download | forums-2d989d4322be484e4d855ad650b9f5e606e690b8.tar forums-2d989d4322be484e4d855ad650b9f5e606e690b8.tar.gz forums-2d989d4322be484e4d855ad650b9f5e606e690b8.tar.bz2 forums-2d989d4322be484e4d855ad650b9f5e606e690b8.tar.xz forums-2d989d4322be484e4d855ad650b9f5e606e690b8.zip |
Merge remote-tracking branch 'nickvergessen/ticket/10435' into develop-olympus
* nickvergessen/ticket/10435:
[ticket/10435] Readd local announcements to total topic count in viewforum
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 2eacbb500a..f15fdb8d08 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -533,10 +533,13 @@ if ($s_display_active) $topics_count = 1; } +// We need to readd the local announcements to the forums total topic count, otherwise the number is different from the one on the forum list +$total_topic_count = $topics_count + sizeof($announcement_list) - sizeof($global_announce_list); + $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_topic_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $total_topic_count))) ); $topic_list = ($store_reverse) ? array_merge($announcement_list, array_reverse($topic_list)) : array_merge($announcement_list, $topic_list); |