add some control for knwoing if user is in install mode
This commit is contained in:
@@ -17,8 +17,10 @@ $loader = require __DIR__ . "/vendor/autoload.php";
|
||||
|
||||
|
||||
|
||||
if (!file_exists(THELIA_ROOT . '/local/config/database.yml')) {
|
||||
define('THELIA_INSTALL_MODE',true);
|
||||
if (!file_exists(THELIA_ROOT . '/local/config/database.yml') && !defined('THELIA_INSTALL_MODE')) {
|
||||
$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals();
|
||||
header('location: '.$request->getSchemeAndHttpHost() . '/install');
|
||||
exit;
|
||||
}
|
||||
/*else {
|
||||
define('THELIA_INSTALL_MODE',true);
|
||||
|
||||
@@ -96,7 +96,10 @@ class Thelia extends Kernel
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
$this->getContainer()->get("event_dispatcher")->dispatch(TheliaEvents::BOOT);
|
||||
if (file_exists(THELIA_ROOT . '/local/config/database.yml') === true) {
|
||||
$this->getContainer()->get("event_dispatcher")->dispatch(TheliaEvents::BOOT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user