Permalink
Browse files

fixes #5971 - Error generated by behavior if invoking overloaded meth…

…od from within the behavior

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7993 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
1 parent 67b9a80 commit eec4d15898fa9de456e1197722648ccb2ea19a6d AD7six committed Jan 14, 2009
Showing with 3 additions and 3 deletions.
  1. +3 −3 cake/libs/model/behaviors/tree.php
@@ -618,19 +618,19 @@ function recover(&$model, $mode = 'parent', $missingParentAction = null) {
function reorder(&$model, $options = array()) {
$options = array_merge(array('id' => null, 'field' => $model->displayField, 'order' => 'ASC', 'verify' => true), $options);
extract($options);
- if ($verify && !$model->verify()) {
+ if ($verify && !$this->verify($model)) {
return false;
}
$verify = false;
extract($this->settings[$model->alias]);
$fields = array($model->primaryKey, $field, $left, $right);
$sort = $field . ' ' . $order;
- $nodes = $model->children($id, true, $fields, $sort, null, null, $recursive);
+ $nodes = $this->children($model, $id, true, $fields, $sort, null, null, $recursive);
if ($nodes) {
foreach ($nodes as $node) {
$id = $node[$model->alias][$model->primaryKey];
- $model->moveDown($id, true);
+ $this->moveDown($model, $id, true);
if ($node[$model->alias][$left] != $node[$model->alias][$right] - 1) {
$this->reorder($model, compact('id', 'field', 'order', 'verify'));
}

0 comments on commit eec4d15

Please sign in to comment.