mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #9867 from chinpei215/2.x-tree-behavior
[2.x] Fix TreeBehavior does access property/method via model
This commit is contained in:
commit
cdef76eeda
1 changed files with 3 additions and 2 deletions
|
@ -112,11 +112,12 @@ class TreeBehavior extends ModelBehavior {
|
|||
* @return void
|
||||
*/
|
||||
protected function _setChildrenLevel(Model $Model, $id) {
|
||||
$settings = $Model->Behaviors->Tree->settings[$Model->alias];
|
||||
$settings = $this->settings[$Model->alias];
|
||||
$primaryKey = $Model->primaryKey;
|
||||
$depths = array($id => (int)$Model->data[$Model->alias][$settings['level']]);
|
||||
|
||||
$children = $Model->children(
|
||||
$children = $this->children(
|
||||
$Model,
|
||||
$id,
|
||||
false,
|
||||
array($primaryKey, $settings['parent'], $settings['level']),
|
||||
|
|
Loading…
Reference in a new issue