From 921f53b7f6757844df1d729e18b847af69ce930a Mon Sep 17 00:00:00 2001 From: Nicolas Barbey <223106@supinfo.com> Date: Mon, 6 Sep 2021 17:12:40 +0200 Subject: [PATCH] fix postActivation --- Comment.php | 7 +++---- templates/backOffice/default/tab-content.html | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Comment.php b/Comment.php index aecaf9a..8dcb9d3 100755 --- a/Comment.php +++ b/Comment.php @@ -90,11 +90,10 @@ public function postActivation(ConnectionInterface $con = null): void } // Schema - try { - CommentQuery::create()->findOne(); - } catch (\Exception $ex) { - $database = new Database($con->getWrappedConnection()); + if (!self::getConfigValue('is_initialized', false)) { + $database = new Database($con); $database->insertSql(null, [__DIR__ . DS . 'Config' . DS . 'thelia.sql']); + self::setConfigValue('is_initialized', true); } // Messages diff --git a/templates/backOffice/default/tab-content.html b/templates/backOffice/default/tab-content.html index 8b1c069..4d47320 100644 --- a/templates/backOffice/default/tab-content.html +++ b/templates/backOffice/default/tab-content.html @@ -12,7 +12,7 @@