Skip to content
Permalink
Browse files

- Some fix into Paginator component for order / sort classic sintax

  • Loading branch information...
lucasferreira committed May 26, 2017
1 parent 57ddc24 commit b539161b2dd9974dc6461e466b3a5d3f8e6b52cd
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Cake/Controller/Component/PaginatorComponent.php
@@ -382,13 +382,13 @@ public function validateSort(Model $object, array $options, array $whitelist = a
}
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;

0 comments on commit b539161

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.