fix pagination, thanks to montebianco

This commit is contained in:
Garvin Hicking 2012-07-27 11:44:49 +02:00
parent 68cd8c7e14
commit f28467845a
2 changed files with 3 additions and 2 deletions

View file

@ -0,0 +1 @@
1.6: Fix pagination being off by one page, thanks to montebianco

View file

@ -26,7 +26,7 @@ class serendipity_event_filter_entries extends serendipity_event
$propbag->add('description', PLUGIN_EVENT_FILTER_ENTRIES_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Garvin Hicking');
$propbag->add('version', '1.5');
$propbag->add('version', '1.6');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
@ -226,7 +226,7 @@ class serendipity_event_filter_entries extends serendipity_event
$this->fetchLimit = $perPage;
$page = (int)$serendipity['GET']['page'];
$offSet = $perPage*$page;
$offSet = $perPage*($page-1);
if (empty($_SESSION['sort']['ordermode']) || $_SESSION['sort']['ordermode'] != 'ASC') {
$_SESSION['sort']['ordermode'] = 'DESC';