This commit is contained in:
Kavalar 2024-10-25 16:09:26 +03:00
parent 76d090febf
commit 0ca330a9f0
2 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "Tags", "name": "Tags",
"version": "0.1", "version": "0.2",
"author": "ITGuild", "author": "ITGuild",
"slug": "tag", "slug": "tag",
"description": "Tags module", "description": "Tags module",

View File

@ -343,10 +343,15 @@ class ModuleService
$tmpModuleDirFull = RESOURCES_DIR . '/tmp/ad/' . $moduleName . "/"; $tmpModuleDirFull = RESOURCES_DIR . '/tmp/ad/' . $moduleName . "/";
$fileHelper = new Files(); $fileHelper = new Files();
$fileHelper->copy_folder(APP_DIR . '/modules/' . $moduleName, $tmpModuleDirFull . 'app/'); $fileHelper->copy_folder(ROOT_DIR . $path, $tmpModuleDirFull . 'app/');
if (file_exists(KERNEL_APP_MODULES_DIR . '/' . $moduleName)){
$fileHelper->copy_folder(KERNEL_APP_MODULES_DIR . '/' . $moduleName, $tmpModuleDirFull . 'kernel/'); $fileHelper->copy_folder(KERNEL_APP_MODULES_DIR . '/' . $moduleName, $tmpModuleDirFull . 'kernel/');
}
else {
mkdir($tmpModuleDirFull . 'kernel/');
}
if (!is_dir(RESOURCES_DIR . '/tmp/module')) { if (!is_dir(RESOURCES_DIR . '/tmp/modules')) {
mkdir(RESOURCES_DIR . '/tmp/modules', 0777, true); mkdir(RESOURCES_DIR . '/tmp/modules', 0777, true);
} }
$fileHelper->pack($tmpModuleDirFull, RESOURCES_DIR . '/tmp/modules/' . $moduleName . '.itguild'); $fileHelper->pack($tmpModuleDirFull, RESOURCES_DIR . '/tmp/modules/' . $moduleName . '.itguild');