Browse Source

Fix stupid bug in moveNode()

tags/v1.0.1
PaulZi 9 years ago
parent
commit
61a05f6bc2
  1. 4
      NestedSetsBehavior.php

4
NestedSetsBehavior.php

@ -555,8 +555,8 @@ class NestedSetsBehavior extends Behavior
$this->shift($to, $left - 1, $delta); $this->shift($to, $left - 1, $delta);
$delta = $to - $left; $delta = $to - $left;
} else { } else {
$this->shift($right + 1, $to, -$delta); $this->shift($right + 1, $to - 1, -$delta);
$delta = $to - $right; $delta = $to - $right - 1;
} }
$this->owner->updateAll( $this->owner->updateAll(
[ [

Loading…
Cancel
Save