From 8ab81a008580becde71c69e153c1984f8902c773 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sun, 31 May 2026 21:09:24 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20remove=20undefined=20$apiBase/$apiToken?= =?UTF-8?q?=20=E2=80=94=20use=20instance=20properties?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sync methods now use $this->targetUrl and $this->healthToken instead of function parameters that no longer exist after the bulk push refactor. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/Extension/ContentSync.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/packages/plg_task_mokowaassync/src/Extension/ContentSync.php b/src/packages/plg_task_mokowaassync/src/Extension/ContentSync.php index 072dcfa1..57491ef4 100644 --- a/src/packages/plg_task_mokowaassync/src/Extension/ContentSync.php +++ b/src/packages/plg_task_mokowaassync/src/Extension/ContentSync.php @@ -149,28 +149,28 @@ final class ContentSync extends CMSPlugin implements SubscriberInterface // Push content types if ((int) ($params->sync_categories ?? 0) === 1) { - $result = $this->syncCategories($apiBase, $apiToken); + $result = $this->syncCategories(); $synced[] = 'categories:' . ($result ? 'ok' : 'fail'); if (!$result) $errors++; } if ((int) ($params->sync_articles ?? 0) === 1) { - $result = $this->syncArticles($apiBase, $apiToken); + $result = $this->syncArticles(); $synced[] = 'articles:' . ($result ? 'ok' : 'fail'); if (!$result) $errors++; } if ((int) ($params->sync_menus ?? 0) === 1) { - $result = $this->syncMenus($apiBase, $apiToken); + $result = $this->syncMenus(); $synced[] = 'menus:' . ($result ? 'ok' : 'fail'); if (!$result) $errors++; } if ((int) ($params->sync_modules ?? 0) === 1) { - $result = $this->syncModules($apiBase, $apiToken); + $result = $this->syncModules(); $synced[] = 'modules:' . ($result ? 'ok' : 'fail'); if (!$result) $errors++; } @@ -204,7 +204,7 @@ final class ContentSync extends CMSPlugin implements SubscriberInterface * * @since 02.31.00 */ - private function syncArticles(string $apiBase, string $token): bool + private function syncArticles(): bool { try { @@ -243,7 +243,7 @@ final class ContentSync extends CMSPlugin implements SubscriberInterface * * @since 02.31.00 */ - private function syncCategories(string $apiBase, string $token): bool + private function syncCategories(): bool { try { @@ -278,7 +278,7 @@ final class ContentSync extends CMSPlugin implements SubscriberInterface /** * Sync menus via bulk push. */ - private function syncMenus(string $apiBase, string $token): bool + private function syncMenus(): bool { try { @@ -313,7 +313,7 @@ final class ContentSync extends CMSPlugin implements SubscriberInterface /** * Sync modules via bulk push. */ - private function syncModules(string $apiBase, string $token): bool + private function syncModules(): bool { try {