Moving limit from the options to the normal paging params. This fixes a few notice errors.

This commit is contained in:
mark_story 2010-12-19 13:15:04 -05:00
parent 176d5520f6
commit cc2d8e2fec
4 changed files with 6 additions and 11 deletions

View file

@ -525,9 +525,9 @@ class PaginatorHelper extends AppHelper {
}
$start = 0;
if ($paging['count'] >= 1) {
$start = (($paging['page'] - 1) * $paging['options']['limit']) + 1;
$start = (($paging['page'] - 1) * $paging['limit']) + 1;
}
$end = $start + $paging['options']['limit'] - 1;
$end = $start + $paging['limit'] - 1;
if ($paging['count'] < $end) {
$end = $paging['count'];
}