Permalink
Browse files

Merge branch 'zoghal-fix-tree-condidtions' into 2.3

Refs #GH-1049
  • Loading branch information...
markstory committed Dec 26, 2012
2 parents 79c6cbd + ed76132 commit 9fc4678fa36b9077dc3b2fe1168bf7bc96880481
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/Cake/Model/Behavior/TreeBehavior.php
@@ -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];
}
@@ -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];
}

0 comments on commit 9fc4678

Please sign in to comment.