mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
setting recursive to -1
This commit is contained in:
parent
74a84c96f1
commit
c02912261b
1 changed files with 2 additions and 1 deletions
|
@ -119,7 +119,8 @@ class TreeBehavior extends ModelBehavior {
|
||||||
extract($this->settings[$Model->alias]);
|
extract($this->settings[$Model->alias]);
|
||||||
$data = current($Model->find('first', array(
|
$data = current($Model->find('first', array(
|
||||||
'conditions' => array($Model->alias . '.' . $Model->primaryKey => $Model->id),
|
'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]) {
|
if (!$data[$right] || !$data[$left]) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue