mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Changing pagination key names
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3391 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
381ccff146
commit
f7d7a2be73
1 changed files with 6 additions and 2 deletions
|
@ -969,8 +969,8 @@ class Controller extends Object{
|
|||
if (isset($options['show'])) {
|
||||
$options['limit'] = $options['show'];
|
||||
}
|
||||
if (isset($options['sort']) && isset($options['dir'])) {
|
||||
$options['order'] = array($options['sort'] => $options['dir']);
|
||||
if (isset($options['sort']) && isset($options['direction'])) {
|
||||
$options['order'] = array($options['sort'] => $options['direction']);
|
||||
} elseif (isset($options['sort'])) {
|
||||
$options['order'] = $options['sort'];
|
||||
}
|
||||
|
@ -999,6 +999,10 @@ class Controller extends Object{
|
|||
$conditions = $fields = $order = $limit = $page = $recursive = null;
|
||||
$options = am($defaults, $options);
|
||||
extract($options);
|
||||
if (empty($conditions)) {
|
||||
$conditions = null;
|
||||
}
|
||||
|
||||
$results = $object->findAll($conditions, $fields, $order, $limit, $page, $recursive);
|
||||
$this->params['paging'][$object->name] = $options;
|
||||
$this->params['paging'][$object->name]['count'] = $object->findCount($conditions);
|
||||
|
|
Loading…
Reference in a new issue