Summary:
values in $paginate array are not correct on the last page
Detailed Description:
While building custom styled pagination buttons in the Guestbook module entylist
view I found that the valujes from the $paginate array are not correct on the
last item.
* How to reproduce:
Setup the Guestbook module with a lot of entries (184) in my situation. Show 20
entries per page (184/20) so we have 20 different pages to show.
* Call the guestbook module:
{cms_module module='Guestbook' guestbook='1' number='20' mode='entrylist'}
* Print some debuggin info into the entrylist template:
<pre>
{$paginate|@print_r}
size: {$paginate.size}
</pre>
* Watch the debug output on prelast and last page:
the size value is changing from 19 to 3 on the last page, this is incorrect!
== prelast page:
Array
(
[page_current] => 10
[page_total] => 10
[total] => 184
[first] => 181
[last] => 184
[size] => 3
[url] => http://xxx.lan/guestbook/
[urlvar] => page_m61366_211
[current_item] => 181
[limit] => 20
)
1
size: 3
== last page:
Array
(
[page_current] => 9
[page_total] => 10
[total] => 184
[first] => 161
[last] => 180
[size] => 19
[url] => http://xxx.lan/guestbook/
[urlvar] => page_m61366_211
[current_item] => 161
[limit] => 20
)
1
size: 19