Permalink
Browse files

Prefix fields with model alias

  • Loading branch information...
ADmad committed Mar 4, 2015
1 parent 63769ae commit a1286e9e7d9c3f653ede9c9c253508db85346c34
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Cake/Model/Behavior/TreeBehavior.php
@@ -132,8 +132,8 @@ protected function _setChildrenLevel($Model, $id) {
$depths[$node[$Model->alias][$primaryKey]] = $depth;
$Model->updateAll(
array($settings['level'] => $depth),
array($primaryKey => $node[$Model->alias][$primaryKey])
array($Model->escapeField($settings['level']) => $depth),
array($Model->escapeField($primaryKey) => $node[$Model->alias][$primaryKey])
);
}
}

0 comments on commit a1286e9

Please sign in to comment.