setting recursive to -1

This commit is contained in:
dogmatic69 2012-02-23 11:36:44 +00:00
parent 74a84c96f1
commit c02912261b

View file

@ -119,7 +119,8 @@ class TreeBehavior extends ModelBehavior {
extract($this->settings[$Model->alias]);
$data = current($Model->find('first', array(
'conditions' => array($Model->alias . '.' . $Model->primaryKey => $Model->id),
'fields' => array($Model->alias . '.' . $left, $Model->alias . '.' . $right))));
'fields' => array($Model->alias . '.' . $left, $Model->alias . '.' . $right),
'recursive' => -1)));
if (!$data[$right] || !$data[$left]) {
return true;