mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
enhancement to paginator
As pointed out, we need to make sure that we are also on the first page to make this conditional clause valid
This commit is contained in:
parent
296ea215b1
commit
823f01601d
1 changed files with 2 additions and 2 deletions
|
@ -202,8 +202,8 @@ class PaginatorComponent extends Component {
|
|||
$count = 0;
|
||||
} elseif ($object->hasMethod('paginateCount')) {
|
||||
$count = $object->paginateCount($conditions, $recursive, $extra);
|
||||
} elseif (count($results)<$limit) {
|
||||
$count = count($results); // no point in finding the count if it's less than our limit
|
||||
} elseif (count($results) < $limit && $page==1) {
|
||||
$count = count($results); // no point in finding the count if it's less than our limit and we're on the first page
|
||||
} else {
|
||||
$parameters = compact('conditions');
|
||||
if ($recursive != $object->recursive) {
|
||||
|
|
Loading…
Reference in a new issue