From bcf8b6621b8cbd1007fa18bd462a9ecedcf69e75 Mon Sep 17 00:00:00 2001 From: stasbilay02 Date: Wed, 18 Dec 2024 16:32:51 +0300 Subject: [PATCH] some fix --- kernel/helpers/Files.php | 2 +- .../controllers/ModuleShopClientController.php | 1 - kernel/services/KernelService.php | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/helpers/Files.php b/kernel/helpers/Files.php index ef154e7..2360dd7 100644 --- a/kernel/helpers/Files.php +++ b/kernel/helpers/Files.php @@ -32,7 +32,7 @@ class Files } } - public function copyKernelFolder($d1, $d2, int $permissions = 0773, bool $recursive = true): void + public function copyKernelFolder($d1, $d2, int $permissions = 0775, bool $recursive = true): void { if (is_dir($d1)) { if (!file_exists($d2)){ diff --git a/kernel/modules/module_shop_client/controllers/ModuleShopClientController.php b/kernel/modules/module_shop_client/controllers/ModuleShopClientController.php index 3612132..5ad60cd 100644 --- a/kernel/modules/module_shop_client/controllers/ModuleShopClientController.php +++ b/kernel/modules/module_shop_client/controllers/ModuleShopClientController.php @@ -124,7 +124,6 @@ class ModuleShopClientController extends AdminController #[NoReturn] public function actionKernelUpdate(): void { - $request = new Request(); $modules_info = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/gb_slug'); $modules_info = json_decode($modules_info->getBody()->getContents(), true); diff --git a/kernel/services/KernelService.php b/kernel/services/KernelService.php index 2eebee9..2523b14 100644 --- a/kernel/services/KernelService.php +++ b/kernel/services/KernelService.php @@ -74,7 +74,9 @@ class KernelService $this->files->copyKernelFolder($tmpKernelDirFull . 'kernel' , ROOT_DIR . "/kernel"); foreach ($files as $file) { + Debug::prn($file); if ($file === 'bootstrap') { + Debug::prn(123); $this->files->recursiveRemoveDir(ROOT_DIR . '/bootstrap'); $this->files->copyKernelFolder($tmpKernelDirFull . 'bootstrap' , ROOT_DIR . '/bootstrap'); } @@ -83,6 +85,7 @@ class KernelService $this->files->recursiveRemoveDir($tmpKernelDirFull); unlink(ROOT_DIR . $path); + Debug::dd("update kernel success"); return true; }