Files
sterivein/core/bootstrap.php
2013-10-24 08:31:49 +02:00

28 lines
839 B
PHP
Executable File

<?php
/**
*
* @file
* Functions needed for Thelia bootstrap
*/
define('THELIA_ROOT' , rtrim(realpath(__DIR__ .'/../'),'/') . "/");
define('THELIA_LOCAL_DIR' , THELIA_ROOT . 'local/');
define('THELIA_CONF_DIR' , THELIA_LOCAL_DIR . 'config/');
define('THELIA_MODULE_DIR' , THELIA_LOCAL_DIR . 'modules/');
define('THELIA_WEB_DIR' , THELIA_ROOT . 'web/');
define('THELIA_TEMPLATE_DIR' , THELIA_ROOT . 'templates/');
define('DS', DIRECTORY_SEPARATOR);
$loader = require __DIR__ . "/vendor/autoload.php";
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);
}*/