1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

Issue #4805 - News pagination fix.

This commit is contained in:
Cameron
2022-06-30 19:03:07 -07:00
parent c494c04c7e
commit ebd85318d6

View File

@@ -1207,16 +1207,8 @@ class news_shortcodes extends e_shortcode
{
$params = (string) e107::getRegistry('core/news/pagination');
parse_str($params,$opts);
if($this->pagination === 'page')
{
$opts['type'] = 'page';
$opts['total'] = ceil($opts['total'] / $opts['amount']);
$opts['current'] = ($opts['current'] / $opts['amount']) + 1;
}
return e107::getParser()->parseTemplate("{NEXTPREV=".http_build_query($opts)."}");
return e107::getParser()->parseTemplate("{NEXTPREV=".$params."}");
}