From f991a99a14da4d7fc79df9429d6f0e5f6d0f8914 Mon Sep 17 00:00:00 2001 From: upstrocker Date: Thu, 23 Mar 2017 12:03:33 +0300 Subject: [PATCH] [ticket/15139] Assigned 'topics_per_page' before template included The element $config['topics_per_page'] was assigned a value after the template was included, which led to incorrect page number display in the header when pagination. Now this var is assigned the correct value before the template is included PHPBB3-15139 --- phpBB/viewforum.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 1938c25fed..5c51975150 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -146,6 +146,13 @@ else } } +// Is a forum specific topic count required? +if ($forum_data['forum_topics_per_page']) +{ + $config['topics_per_page'] = $forum_data['forum_topics_per_page']; +} + +/* @var $phpbb_content_visibility \phpbb\content_visibility */ $phpbb_content_visibility = $phpbb_container->get('content.visibility'); // Dump out the page header and load viewforum template @@ -209,12 +216,6 @@ if ($mark_read == 'topics') trigger_error($user->lang['TOPICS_MARKED'] . '

' . sprintf($user->lang['RETURN_FORUM'], '', '')); } -// Is a forum specific topic count required? -if ($forum_data['forum_topics_per_page']) -{ - $config['topics_per_page'] = $forum_data['forum_topics_per_page']; -} - // Do the forum Prune thang - cron type job ... if (!$config['use_system_cron']) {