1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-14 21:56:39 +02:00

[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
This commit is contained in:
upstrocker
2017-03-23 12:03:33 +03:00
committed by Marc Alexander
parent 827ded82b8
commit f991a99a14

View File

@ -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'] . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect_url . '">', '</a>'));
}
// 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'])
{