From 5308f14d866ee1fb5bd74ffef2a543fc4f47872f Mon Sep 17 00:00:00 2001 From: XenialDan Date: Wed, 5 Oct 2022 09:31:04 +0200 Subject: [PATCH] Fix replace and pasteasset --- src/xenialdan/MagicWE2/task/AsyncPasteAssetTask.php | 2 +- src/xenialdan/MagicWE2/task/AsyncReplaceTask.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenialdan/MagicWE2/task/AsyncPasteAssetTask.php b/src/xenialdan/MagicWE2/task/AsyncPasteAssetTask.php index c818c6c..d463b54 100644 --- a/src/xenialdan/MagicWE2/task/AsyncPasteAssetTask.php +++ b/src/xenialdan/MagicWE2/task/AsyncPasteAssetTask.php @@ -72,7 +72,7 @@ public function onRun(): void /** @var Selection $selection */ $selection = igbinary_unserialize($this->selection/*, ['allowed_classes' => [Selection::class]]*/);//TODO test pm4 - $manager = $selection->getIterator()->getManager(); + $manager = $this->manager; // unset($touchedChunks); //$selection = igbinary_unserialize($this->selection/*, ['allowed_classes' => [Selection::class]]*/);//TODO test pm4 diff --git a/src/xenialdan/MagicWE2/task/AsyncReplaceTask.php b/src/xenialdan/MagicWE2/task/AsyncReplaceTask.php index 29fb300..40f2da9 100644 --- a/src/xenialdan/MagicWE2/task/AsyncReplaceTask.php +++ b/src/xenialdan/MagicWE2/task/AsyncReplaceTask.php @@ -62,7 +62,7 @@ public function onRun(): void /** @var Selection $selection */ $selection = igbinary_unserialize($this->selection/*, ['allowed_classes' => [Selection::class]]*/);//TODO test pm4 - $manager = $selection->getIterator()->getManager(); + $manager = $this->manager; $oldBlocks = iterator_to_array($this->execute($manager, $selection, $this->searchBlocks, $this->replaceBlocks, $changed));