fix: remove undefined $apiBase/$apiToken — use instance properties
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user