From 063e01f41d69c4c6f04a0f55cd0147bb1893dcea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Thu, 12 Oct 2023 22:33:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=A8=A1=E5=9D=97=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E7=BA=AF=E5=87=80=E6=A8=A1=E5=BC=8F=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/library/module/Manage.php | 6 +++++- config/buildadmin.php | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/admin/library/module/Manage.php b/app/admin/library/module/Manage.php index 4c126945..79784a5e 100644 --- a/app/admin/library/module/Manage.php +++ b/app/admin/library/module/Manage.php @@ -694,7 +694,7 @@ class Manage RecursiveIteratorIterator::SELF_FIRST ) as $item ) { - $destDirItem = $destDir . DIRECTORY_SEPARATOR . $iterator->getSubPathName(); + $destDirItem = Filesystem::fsFit($destDir . DIRECTORY_SEPARATOR . str_replace($baseDir, '', $item->getPathname())); if ($item->isDir()) { Filesystem::mkdir($destDirItem); } else { @@ -704,6 +704,10 @@ class Manage } } } + // 纯净模式 + if (Config::get('buildadmin.module_pure_install')) { + Filesystem::delDir($baseDir); + } } return true; } diff --git a/config/buildadmin.php b/config/buildadmin.php index cf273ef8..3387f2c7 100644 --- a/config/buildadmin.php +++ b/config/buildadmin.php @@ -24,6 +24,8 @@ return [ 'auto_sort_eq_weight' => false, // 开启前台会员中心 'open_member_center' => true, + // 模块纯净安装(安装时移动模块文件而不是复制) + 'module_pure_install' => true, // 点选验证码配置 'click_captcha' => [ // 模式:text=文字,icon=图标(若只有icon则适用于国际化站点)