From 4eb05da890073316180b55cdbea8d0e3f4c292ca Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 15 Apr 2004 22:18:08 +0000 Subject: [PATCH] - Patch #7161 by jhriggs: fixed bug with 'last page' functionality. --- includes/pager.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/pager.inc b/includes/pager.inc index 7eb3585b871..c15515589f6 100644 --- a/includes/pager.inc +++ b/includes/pager.inc @@ -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); }