This commit is contained in:
2024-10-23 17:06:10 +03:00
parent 2470c5dba8
commit 3846da3f94
4 changed files with 10 additions and 8 deletions

View File

@ -50,11 +50,14 @@ class ModuleShopController extends AdminController
$zip = new ZipArchive;
$res = $zip->open(ROOT_DIR . $moduleShopForm->getItem('path_to_archive'));
if ($res === TRUE) {
if (!is_dir(RESOURCES_DIR . '/tmp/ms/')) {
mkdir(RESOURCES_DIR . '/tmp/ms/');
}
$tmpModuleShopDirFull = RESOURCES_DIR . '/tmp/ms/' . $tmpThemeDir . "/";
$zip->extractTo($tmpModuleShopDirFull);
$zip->close();
if (file_exists($tmpModuleShopDirFull . "/app/manifest.json")){
if (file_exists($tmpModuleShopDirFull . "app/manifest.json")){
$moduleInfo = $this->moduleShopService->getModuleInfo($tmpModuleShopDirFull . "app");
$moduleShopForm->load($moduleInfo);
}