diff --git a/plugins/bc-blog/src/Plugin.php b/plugins/bc-blog/src/Plugin.php index fcd353b4b7..9de5e710d7 100755 --- a/plugins/bc-blog/src/Plugin.php +++ b/plugins/bc-blog/src/Plugin.php @@ -48,7 +48,7 @@ public function install($options = []) : bool { $result = parent::install($options); // ブログ記事の投稿日を更新 - $this->updateDateNow('BcBlog.BlogPosts', ['posted']); + $this->updateDateNow('BcBlog.BlogPosts', ['posted'], [], $options); return $result; } diff --git a/plugins/bc-custom-content/src/Plugin.php b/plugins/bc-custom-content/src/Plugin.php index 5fcaa950ce..8e081bb3c4 100644 --- a/plugins/bc-custom-content/src/Plugin.php +++ b/plugins/bc-custom-content/src/Plugin.php @@ -43,11 +43,13 @@ class Plugin extends BcPlugin */ public function install($options = []): bool { - // ここに必要なインストール処理を記述 + $options = array_merge([ + 'connection' => 'default' + ], $options); $result = parent::install($options); - $table = TableRegistry::getTableLocator()->get('BcCustomContent.CustomEntries'); + $table = TableRegistry::getTableLocator()->get('BcCustomContent.CustomEntries', ['connectionName' => $options['connection']]); $table->setUp(1); - $this->updateDateNow('BcCustomContent.CustomEntries', ['published']); + $this->updateDateNow('BcCustomContent.CustomEntries', ['published'], [], $options); return $result; }