From 9b3a46c170e91f4b44fc8fc6bdae42761109387b Mon Sep 17 00:00:00 2001 From: Thomas Nabord Date: Thu, 9 Jan 2025 15:53:05 +0000 Subject: [PATCH] Add exit links to the post update and restore pages --- .../admin/self-managed/RestorePagePostRestoreController.php | 3 +-- .../admin/self-managed/UpdatePagePostUpdateController.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/controllers/admin/self-managed/RestorePagePostRestoreController.php b/controllers/admin/self-managed/RestorePagePostRestoreController.php index 36ca050ef..f549e5221 100644 --- a/controllers/admin/self-managed/RestorePagePostRestoreController.php +++ b/controllers/admin/self-managed/RestorePagePostRestoreController.php @@ -32,7 +32,6 @@ use PrestaShop\Module\AutoUpgrade\Task\TaskType; use PrestaShop\Module\AutoUpgrade\Twig\Steps\RestoreSteps; use PrestaShop\Module\AutoUpgrade\Twig\Steps\Stepper; -use PrestaShop\Module\AutoUpgrade\UpgradeContainer; class RestorePagePostRestoreController extends AbstractPageWithStepController { @@ -65,7 +64,7 @@ protected function getParams(): array return array_merge( $updateSteps->getStepParams($this::CURRENT_STEP), [ - 'exit_link' => DIRECTORY_SEPARATOR . $this->upgradeContainer->getProperty(UpgradeContainer::PS_ADMIN_SUBDIR) . DIRECTORY_SEPARATOR . 'index.php', + 'exit_link' => $this->upgradeContainer->getUrlGenerator()->getShopAdminAbsolutePathFromRequest($this->request), 'dev_doc_link' => DocumentationLinks::DEV_DOC_UPGRADE_POST_RESTORE_URL, 'download_logs' => $this->upgradeContainer->getLogsService()->getDownloadLogsData(TaskType::TASK_TYPE_RESTORE), ] diff --git a/controllers/admin/self-managed/UpdatePagePostUpdateController.php b/controllers/admin/self-managed/UpdatePagePostUpdateController.php index 11c02c619..942ecd846 100644 --- a/controllers/admin/self-managed/UpdatePagePostUpdateController.php +++ b/controllers/admin/self-managed/UpdatePagePostUpdateController.php @@ -32,7 +32,6 @@ use PrestaShop\Module\AutoUpgrade\Task\TaskType; use PrestaShop\Module\AutoUpgrade\Twig\Steps\Stepper; use PrestaShop\Module\AutoUpgrade\Twig\Steps\UpdateSteps; -use PrestaShop\Module\AutoUpgrade\UpgradeContainer; class UpdatePagePostUpdateController extends AbstractPageWithStepController { @@ -65,7 +64,7 @@ protected function getParams(): array return array_merge( $updateSteps->getStepParams($this::CURRENT_STEP), [ - 'exit_link' => DIRECTORY_SEPARATOR . $this->upgradeContainer->getProperty(UpgradeContainer::PS_ADMIN_SUBDIR) . DIRECTORY_SEPARATOR . 'index.php', + 'exit_link' => $this->upgradeContainer->getUrlGenerator()->getShopAdminAbsolutePathFromRequest($this->request), 'dev_doc_link' => DocumentationLinks::DEV_DOC_UPGRADE_POST_UPGRADE_URL, 'download_logs' => $this->upgradeContainer->getLogsService()->getDownloadLogsData(TaskType::TASK_TYPE_UPDATE), ]