Skip to content

Commit

Permalink
Merge pull request #4 from ThomasDaSilva/main
Browse files Browse the repository at this point in the history
Fix database initialization
  • Loading branch information
ThomasDaSilva authored Feb 19, 2024
2 parents 5181e9f + 985ac2d commit 2d96924
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 67 deletions.
2 changes: 1 addition & 1 deletion Config/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>1.0.2</version>
<version>1.0.3</version>
<authors>
<author>
<name>Chabreuil Antoine</name>
Expand Down
66 changes: 0 additions & 66 deletions Config/update/1.0.2.sql

This file was deleted.

7 changes: 7 additions & 0 deletions GuaranteedOpinion.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ public static function log($msg): void

public function postActivation(ConnectionInterface $con = null): void
{
$database = new Database($con);

if (!self::getConfigValue('is_initialized', false)) {
$database->insertSql(null, [__DIR__ . "/Config/TheliaMain.sql"]);
self::setConfigValue('is_initialized', true);
}

self::setConfigValue(self::SITE_REVIEW_HOOK_DISPLAY, 'main.content-bottom');
self::setConfigValue(self::PRODUCT_REVIEW_HOOK_DISPLAY, 'product.bottom');
}
Expand Down

0 comments on commit 2d96924

Please # to comment.