Quelques nouveaux fichiers et modules en conf
This commit is contained in:
31
local/modules/OrderComment/OrderComment.php
Normal file
31
local/modules/OrderComment/OrderComment.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace OrderComment;
|
||||
|
||||
use OrderComment\Model\OrderCommentQuery;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Thelia\Install\Database;
|
||||
use Thelia\Module\BaseModule;
|
||||
|
||||
class OrderComment extends BaseModule
|
||||
{
|
||||
public function postActivation(ConnectionInterface $con = null)
|
||||
{
|
||||
try {
|
||||
OrderCommentQuery::create()->findOne();
|
||||
} catch (\Exception $e) {
|
||||
$database = new Database($con->getWrappedConnection());
|
||||
$database->insertSql(null, array(THELIA_ROOT . '/local/modules/OrderComment/Config/thelia.sql'));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user