mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +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');
|
$params = (string) e107::getRegistry('core/news/pagination');
|
||||||
|
|
||||||
parse_str($params,$opts);
|
|
||||||
|
|
||||||
if($this->pagination === 'page')
|
return e107::getParser()->parseTemplate("{NEXTPREV=".$params."}");
|
||||||
{
|
|
||||||
$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)."}");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user