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