Skip to content

Commit

Permalink
ユニットテストの失敗を調整
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Dec 6, 2023
1 parent fb13bd2 commit d3f5a4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions plugins/baser-core/src/Model/Table/PluginsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ public function getPluginConfig($name)
'core' => $core,
'permission' => 1,
'registered' => false,
'db_init' => false,
'screenshot' => $hasScreenshot
]);
}
Expand Down
6 changes: 5 additions & 1 deletion plugins/baser-core/src/Service/PluginsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,15 @@ public function getIndex(string $sortMode): array
*/
public function install($name, bool $permission = true, $connection = 'default'): ?bool
{
$dbInit = false;
$config = $this->Plugins->getPluginConfig($name);
if($config) {
$dbInit = $config->db_init;
}
$options = [
'permission' => $permission,
'connection' => $connection,
'db_init' => $config?->db_init
'db_init' => $dbInit
];
BcUtil::includePluginClass($name);
$plugins = CakePlugin::getCollection();
Expand Down

0 comments on commit d3f5a4c

Please sign in to comment.