mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Merge branch 'zoghal-fix-tree-condidtions' into 2.3
Refs #GH-1049
This commit is contained in:
commit
9fc4678fa3
1 changed files with 4 additions and 2 deletions
|
@ -941,7 +941,8 @@ class TreeBehavior extends ModelBehavior {
|
|||
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 @@ class TreeBehavior extends ModelBehavior {
|
|||
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];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue