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:
@@ -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."}");
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user