Adding page # fix for PaginatorHelper::counter() (Ticket #1994)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4417 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-02-02 21:38:11 +00:00
parent 46aa081d5c
commit 2648b23238

View file

@ -355,8 +355,10 @@ class PaginatorHelper extends AppHelper {
$options);
$paging = $this->params($options['model']);
$start = $paging['page'] > 1 ? ($paging['page'] - 1) * ($paging['options']['limit']) + 1 : '1';
$end = ($paging['count'] < ($start + $paging['options']['limit'] - 1)) ? $paging['count'] : ($start + $paging['options']['limit'] - 1);
$paging['pageCount'] = ife($paging['pageCount'] == 0, 1, $paging['pageCount']);
$start = ife($paging['page'] > 1, ($paging['page'] - 1) * ($paging['options']['limit']) + 1, '1');
$end = ife(($paging['count'] < ($start + $paging['options']['limit'] - 1)), $paging['count'], ($start + $paging['options']['limit'] - 1));
switch ($options['format']) {
case 'range':