fix issue on command line when thelia is still not installed
This commit is contained in:
@@ -16,10 +16,12 @@ define('DS' , DIRECTORY_SEPARATOR);
|
|||||||
$loader = require __DIR__ . "/vendor/autoload.php";
|
$loader = require __DIR__ . "/vendor/autoload.php";
|
||||||
|
|
||||||
if (!file_exists(THELIA_ROOT . '/local/config/database.yml') && !defined('THELIA_INSTALL_MODE')) {
|
if (!file_exists(THELIA_ROOT . '/local/config/database.yml') && !defined('THELIA_INSTALL_MODE')) {
|
||||||
$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals();
|
$sapi = php_sapi_name();
|
||||||
header('location: '.$request->getSchemeAndHttpHost() . '/install');
|
if (substr($sapi, 0, 3) == 'cli') {
|
||||||
exit;
|
define('THELIA_INSTALL_MODE', true);
|
||||||
|
} else {
|
||||||
|
$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals();
|
||||||
|
header('location: '.$request->getSchemeAndHttpHost() . '/install');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*else {
|
|
||||||
define('THELIA_INSTALL_MODE',true);
|
|
||||||
}*/
|
|
||||||
|
|||||||
Reference in New Issue
Block a user