- Patch #7161 by jhriggs: fixed bug with 'last page' functionality.

4.5.x
Dries Buytaert 2004-04-15 22:18:08 +00:00
parent 2caeac91ae
commit 4eb05da890
1 changed files with 1 additions and 1 deletions

View File

@ -170,7 +170,7 @@ function pager_next($text, $limit, $element = 0, $n = 1, $attributes = array())
function pager_last($text, $limit, $element = 0, $attributes = array()) {
global $pager_from_array, $pager_total;
$from_new = pager_load_array(($pager_total[$element] - $limit), $element, $pager_from_array);
$from_new = pager_load_array(($pager_total[$element] - ($pager_total[$element] % $limit)), $element, $pager_from_array);
if ($from_new[$element] < ($pager_from_array[$element] + $limit)) {
return pager_next($text, $limit, $element, 1, $attributes);
}