Skip to content

Commit

Permalink
Merge branch 'zoghal-fix-tree-condidtions' into 2.3
Browse files Browse the repository at this point in the history
Refs #GH-1049
  • Loading branch information
markstory committed Dec 26, 2012
2 parents 79c6cbd + ed76132 commit 9fc4678
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Cake/Model/Behavior/TreeBehavior.php
Expand Up @@ -941,7 +941,8 @@ protected function _getMax(Model $Model, $scope, $right, $recursive = -1, $creat
list($edge) = array_values($Model->find('first', array(
'conditions' => $scope,
'fields' => $db->calculate($Model, 'max', array($name, $right)),
'recursive' => $recursive
'recursive' => $recursive,
'callbacks' => false
)));
return (empty($edge[$right])) ? 0 : $edge[$right];
}
Expand All @@ -961,7 +962,8 @@ protected function _getMin(Model $Model, $scope, $left, $recursive = -1) {
list($edge) = array_values($Model->find('first', array(
'conditions' => $scope,
'fields' => $db->calculate($Model, 'min', array($name, $left)),
'recursive' => $recursive
'recursive' => $recursive,
'callbacks' => false
)));
return (empty($edge[$left])) ? 0 : $edge[$left];
}
Expand Down

0 comments on commit 9fc4678

Please sign in to comment.