|
@@ 279-281 (lines=3) @@
|
| 276 |
|
$result = $this->owner->getAttribute($this->leftAttribute) > $node->getAttribute($this->leftAttribute) |
| 277 |
|
&& $this->owner->getAttribute($this->rightAttribute) < $node->getAttribute($this->rightAttribute); |
| 278 |
|
|
| 279 |
|
if ($result && $this->treeAttribute !== null) { |
| 280 |
|
$result = $this->owner->getAttribute($this->treeAttribute) === $node->getAttribute($this->treeAttribute); |
| 281 |
|
} |
| 282 |
|
|
| 283 |
|
return $result; |
| 284 |
|
} |
|
@@ 679-681 (lines=3) @@
|
| 676 |
|
protected function shift($from, $to, $delta, $tree = null) |
| 677 |
|
{ |
| 678 |
|
if ($delta !== 0 && ($to === null || $to >= $from)) { |
| 679 |
|
if ($this->treeAttribute !== null && $tree === null) { |
| 680 |
|
$tree = $this->owner->getAttribute($this->treeAttribute); |
| 681 |
|
} |
| 682 |
|
foreach ([$this->leftAttribute, $this->rightAttribute] as $i => $attribute) { |
| 683 |
|
$this->owner->updateAll( |
| 684 |
|
[$attribute => new Expression("[[{$attribute}]]" . sprintf('%+d', $delta))], |