Skip to content

Commit

Permalink
Merge pull request #905 from mollie/PRES-430
Browse files Browse the repository at this point in the history
PRES-430: Make cloudsync option to install
  • Loading branch information
JevgenijVisockij authored Apr 10, 2024
2 parents 8d951f1 + c2e0fd4 commit 243afb2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions controllers/admin/AdminMollieSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct()
$this->bootstrap = true;
}

private function initCloudSyncAndPsAccounts(): bool
private function initCloudSyncAndPsAccounts(): void
{
$mboInstaller = new Prestashop\ModuleLibMboInstaller\DependencyBuilder($this->module);

Expand All @@ -37,7 +37,7 @@ private function initCloudSyncAndPsAccounts(): bool

$this->content .= $this->context->smarty->fetch($this->module->getLocalPath() . 'views/templates/admin/dependency_builder.tpl');

return false;
return;
}

$this->context->smarty->assign('module_dir', $this->module->getPathUri());
Expand All @@ -55,7 +55,7 @@ private function initCloudSyncAndPsAccounts(): bool
} catch (Exception $e) {
$this->context->controller->errors[] = $e->getMessage();

return false;
return;
}
}
try {
Expand Down Expand Up @@ -86,7 +86,7 @@ private function initCloudSyncAndPsAccounts(): bool

$this->content .= $this->context->smarty->fetch($this->module->getLocalPath() . 'views/templates/admin/cloudsync.tpl');

return true;
return;
}

public function postProcess()
Expand All @@ -99,10 +99,9 @@ public function postProcess()
$this->module->getService(\Mollie\Builder\Content\LogoInfoBlock::class),
$this->module->getLocalPath() . 'views/templates/admin/logo.tpl'
);
$cloudSyncComplete = $this->initCloudSyncAndPsAccounts();
if (!$cloudSyncComplete) {
return;
}

$this->initCloudSyncAndPsAccounts();

/** @var \Mollie\Repository\ModuleRepository $moduleRepository */
$moduleRepository = $this->module->getService(\Mollie\Repository\ModuleRepository::class);
$moduleDatabaseVersion = $moduleRepository->getModuleDatabaseVersion($this->module->name);
Expand Down

0 comments on commit 243afb2

Please sign in to comment.