Skip to content

Commit

Permalink
fix postActivation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Barbey committed Sep 6, 2021
1 parent 5f9a198 commit 921f53b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion templates/backOffice/default/tab-content.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="col-md-12">
<div class="form-container clearfix">
<form method="POST" id="comment-form" action="{url path="/admin/module/comment/activation/$ref/$id"}">
<div class="form-group {if $error}has-error{/if}">
<div class="form-group {if $error|default:null}has-error{/if}">
<label for="comment-status" class="control-label">
{intl d='comment.bo.default' l="Status :"}
</label>
Expand Down

0 comments on commit 921f53b

Please sign in to comment.