This commit is contained in:
Билай Станислав 2025-01-24 16:20:15 +03:00
parent 68b5741f46
commit 4a4d5b083f

View File

@ -92,7 +92,7 @@ class ModuleShopClientController extends AdminController
Files::uploadByUrl($_ENV['MODULE_SHOP_URL'] . $module_info['path_to_archive'], RESOURCES_DIR . "/tmp/modules"); Files::uploadByUrl($_ENV['MODULE_SHOP_URL'] . $module_info['path_to_archive'], RESOURCES_DIR . "/tmp/modules");
$this->moduleService->installModule('/resources/tmp/modules/' . basename($module_info['path_to_archive'])); $this->moduleService->installModule('/resources/tmp/modules/' . basename($module_info['path_to_archive']));
Flash::setMessage("success", "Модуль успешно установлен."); Flash::setMessage("success", "Модуль успешно загружен.");
$this->redirect('/admin/module_shop_client', 302); $this->redirect('/admin/module_shop_client', 302);
} }
@ -254,7 +254,7 @@ class ModuleShopClientController extends AdminController
$adminThemeInfo = json_decode($adminThemeInfo->getBody()->getContents(), true); $adminThemeInfo = json_decode($adminThemeInfo->getBody()->getContents(), true);
Files::uploadByUrl($_ENV['MODULE_SHOP_URL'] . $adminThemeInfo['path_to_archive'], RESOURCES_DIR . "/tmp/admin_themes"); Files::uploadByUrl($_ENV['MODULE_SHOP_URL'] . $adminThemeInfo['path_to_archive'], RESOURCES_DIR . "/tmp/admin_themes");
if ($this->adminThemeService->install('/resources/tmp/admin_themes/' . basename($adminThemeInfo['path_to_archive']))) { if ($this->adminThemeService->install('/resources/tmp/admin_themes/' . basename($adminThemeInfo['path_to_archive']))) {
Flash::setMessage("success", "Тема админ-панели успешно установлена."); Flash::setMessage("success", "Тема админ-панели успешно загружена.");
} else { } else {
Session::start(); Session::start();
Session::set("error", implode(";", $this->adminThemeService->getErrors())); Session::set("error", implode(";", $this->adminThemeService->getErrors()));
@ -306,7 +306,7 @@ class ModuleShopClientController extends AdminController
$themeInfo = json_decode($themeInfo->getBody()->getContents(), true); $themeInfo = json_decode($themeInfo->getBody()->getContents(), true);
Files::uploadByUrl($_ENV['MODULE_SHOP_URL'] . $themeInfo['path_to_archive'], RESOURCES_DIR . "/tmp/themes"); Files::uploadByUrl($_ENV['MODULE_SHOP_URL'] . $themeInfo['path_to_archive'], RESOURCES_DIR . "/tmp/themes");
if ($this->themeService->install('/resources/tmp/themes/' . basename($themeInfo['path_to_archive']))) { if ($this->themeService->install('/resources/tmp/themes/' . basename($themeInfo['path_to_archive']))) {
Flash::setMessage("success", "Тема сайта успешно установлена."); Flash::setMessage("success", "Тема сайта успешно загружена.");
} else { } else {
Session::start(); Session::start();
Session::set("error", implode(";", $this->themeService->getErrors())); Session::set("error", implode(";", $this->themeService->getErrors()));