mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
- Some fix into Paginator component for order / sort classic sintax
This commit is contained in:
parent
57ddc24b35
commit
b539161b2d
1 changed files with 3 additions and 3 deletions
|
@ -382,13 +382,13 @@ class PaginatorComponent extends Component {
|
|||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
if (!empty($options['order']) && is_array($options['order'])) {
|
||||
$order = array();
|
||||
foreach ($options['order'] as $key => $value) {
|
||||
if (is_int($key)) {
|
||||
$key = $value;
|
||||
$value = 'asc';
|
||||
$field = explode(' ', $value);
|
||||
$key = $field[0];
|
||||
$value = count($field) === 2 ? trim($field[1]) : 'asc';
|
||||
}
|
||||
$field = $key;
|
||||
$alias = $object->alias;
|
||||
|
|
Loading…
Reference in a new issue