diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-01-29 03:17:09 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-01-29 03:17:09 +0000 |
commit | ad82721c3b164438d01ecc28350d8168894512a8 (patch) | |
tree | 4c42e3d8260607844cf27cd1e7d3c0de187105fa | |
parent | 8d4b0afa4f42f6c00482bf72a2ce4c8b3a40028b (diff) |
Fix an off-by-one issue-- the destination level is the target's child, not the target itself.
-rw-r--r-- | core/libraries/ORM_MPTT.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/libraries/ORM_MPTT.php b/core/libraries/ORM_MPTT.php index 36065a69..4fa0a77a 100644 --- a/core/libraries/ORM_MPTT.php +++ b/core/libraries/ORM_MPTT.php @@ -222,7 +222,7 @@ class ORM_MPTT_Core extends ORM { $original_left = $this->left; $original_right = $this->right; $target_right = $target->right; - $level_delta = $target->level - $this->level; + $level_delta = ($target->level + 1) - $this->level; $this->lock(); try { |