Skip to content

Commit

Permalink
Fix order in finderTreeList
Browse files Browse the repository at this point in the history
Fixed missing order left (ASC) in the finderTreeList
  • Loading branch information
fiblan committed Oct 3, 2014
1 parent 72a892a commit 5acecb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model/Behavior/TreeBehavior.php
Expand Up @@ -393,7 +393,7 @@ function ($field) use ($alias) {
*/
public function findTreeList(Query $query, array $options) {
return $this->_scope($query)
->find('threaded', ['parentField' => $this->config()['parent']])
->find('threaded', ['parentField' => $this->config()['parent'], 'order' => [$this->config()['left'] => 'ASC']])
->formatResults(function ($results) use ($options) {
$options += [
'keyPath' => $this->_getPrimaryKey(),
Expand Down

0 comments on commit 5acecb7

Please sign in to comment.