diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 03388c6454..dff965a1ee 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -148,6 +148,12 @@ 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');
@@ -212,12 +218,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'])
{