Compare commits

...

3 Commits

Author SHA1 Message Date
8eae977357 module service fix 2024-10-25 16:36:48 +03:00
42aca3c1c0 Merge branch 'master' of https://git.itguild.info/stasbilay02/MicroFrameWork 2024-10-25 16:09:33 +03:00
0ca330a9f0 merge 2024-10-25 16:09:26 +03:00
4 changed files with 12 additions and 7 deletions

View File

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

View File

@ -82,11 +82,11 @@ class Files
if(is_dir($include)) {
if ($include->getFilename() === 'app_modules') continue;
$tmpFolder = $folder . '/' . $include->getFilename() . '/';
$tmpFolder = $folder . '/' . $include->getFilename();
$this->recursiveAddFile($zip, $include, $tmpFolder);
}
if (is_file($include)) {
$zip->addFile($include->getPathName(), $folder . $include->getFilename());
$zip->addFile($include->getPathName(), $folder . "/" . $include->getFilename());
}
}
}

View File

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

View File

@ -342,15 +342,20 @@ class ModuleService
$tmpModuleDirFull = RESOURCES_DIR . '/tmp/ad/' . $moduleName . "/";
$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/');
}
else {
mkdir($tmpModuleDirFull . 'kernel/');
}
if (!is_dir(RESOURCES_DIR . '/tmp/modules')) {
mkdir(RESOURCES_DIR . '/tmp/modules', 0777, true);
}
$fileHelper->pack($tmpModuleDirFull, RESOURCES_DIR . '/tmp/modules/' . $moduleName . '.igm');
$fileHelper->recursiveRemoveDir($tmpModuleDirFull);
//$fileHelper->recursiveRemoveDir($tmpModuleDirFull);
}
/**