From 7cdd2b6226ea17e8bfbbe8035cd9c4d06c7ac778 Mon Sep 17 00:00:00 2001 From: ryuring Date: Sun, 17 Nov 2024 17:21:58 +0900 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E3=83=86=E3=83=BC=E3=83=9E=E3=83=97?= =?UTF-8?q?=E3=83=A9=E3=82=B0=E3=82=A4=E3=83=B3=E3=80=91=E3=83=86=E3=83=BC?= =?UTF-8?q?=E3=83=9E=E9=81=A9=E7=94=A8=E6=99=82=E3=81=AB=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=81=8C?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=83=97=E3=83=A9=E3=82=B0?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=81=8C=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=82=92=E6=94=B9=E5=96=84=20fix=20#4013?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/baser-core/src/Service/ThemesService.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/baser-core/src/Service/ThemesService.php b/plugins/baser-core/src/Service/ThemesService.php index f08400b68b..e60a5eaeb8 100644 --- a/plugins/baser-core/src/Service/ThemesService.php +++ b/plugins/baser-core/src/Service/ThemesService.php @@ -23,6 +23,7 @@ use BaserCore\Annotation\Checked; use BaserCore\Utility\BcZip; use BcMail\Service\MailMessagesServiceInterface; +use Cake\Core\App; use Cake\Core\Configure; use Cake\Core\Plugin; use Cake\Datasource\EntityInterface; @@ -286,6 +287,12 @@ private function getThemesDefaultDataInfo(string $theme, array $info = []) */ public function installThemesPlugins(string $theme) { + $paths = App::path('plugins'); + $path = BcUtil::getPluginPath($theme) . 'plugins' . DS; + if(!is_dir($path)) return; + if(!in_array($path, $paths)) { + Configure::write('App.paths.plugins', array_merge($paths, [$path])); + } /* @var PluginsService $pluginsService */ $pluginsService = $this->getService(PluginsServiceInterface::class); $plugins = BcUtil::getThemesPlugins($theme);