Skip to content

Commit

Permalink
bc-custom-content plugin (#2837)
Browse files Browse the repository at this point in the history
  • Loading branch information
nghiem-mb authored Nov 1, 2023
1 parent e675197 commit 827848d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/bc-custom-content/src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

use BaserCore\BcPlugin;
use BaserCore\Utility\BcEvent;
use BaserCore\Utility\BcFolder;
use BaserCore\Utility\BcUtil;
use BcCustomContent\ServiceProvider\BcCustomContentServiceProvider;
use Cake\Core\Configure;
use Cake\Core\ContainerInterface;
use \Cake\Core\Plugin as CakePlugin;
use Cake\Core\PluginApplicationInterface;
use Cake\Filesystem\Folder;
use BaserCore\Annotation\UnitTest;
use BaserCore\Annotation\NoTodo;
use BaserCore\Annotation\Checked;
Expand Down Expand Up @@ -89,17 +89,17 @@ public function loadPlugin(): void
[$path]
));

$Folder = new Folder($path);
$files = $Folder->read(true, true, false);
if (empty($files[0])) return;
$Folder = new BcFolder($path);
$files = $Folder->getFolders();
if (empty($files)) return;

if (Configure::read('BcRequest.asset')) {
// TODO ucmitz 検証要
foreach($files[0] as $pluginName) {
foreach($files as $pluginName) {
BcUtil::includePluginClass($pluginName);
}
} else {
foreach($files[0] as $pluginName) {
foreach($files as $pluginName) {
// 設定ファイルを読み込む
if (!BcUtil::includePluginClass($pluginName)) continue;
$pluginCollection = CakePlugin::getCollection();
Expand Down

0 comments on commit 827848d

Please sign in to comment.