mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
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:
parent
46aa081d5c
commit
2648b23238
1 changed files with 4 additions and 2 deletions
|
@ -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':
|
||||
|
|
Loading…
Add table
Reference in a new issue