Optimisation of THELIA_* constants usage
This commit is contained in:
@@ -180,8 +180,8 @@ class Install extends ContainerAwareCommand
|
||||
{
|
||||
$fs = new Filesystem();
|
||||
|
||||
$sampleConfigFile = THELIA_ROOT . "/local/config/database.yml.sample";
|
||||
$configFile = THELIA_ROOT . "/local/config/database.yml";
|
||||
$sampleConfigFile = THELIA_CONF_DIR . "database.yml.sample";
|
||||
$configFile = THELIA_CONF_DIR . "database.yml";
|
||||
|
||||
$fs->copy($sampleConfigFile, $configFile, true);
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ class Thelia extends Kernel
|
||||
}
|
||||
|
||||
$definePropel = new DefinePropel(new DatabaseConfiguration(),
|
||||
Yaml::parse(THELIA_ROOT . '/local/config/database.yml'));
|
||||
Yaml::parse(THELIA_CONF_DIR . 'database.yml'));
|
||||
$serviceContainer = Propel::getServiceContainer();
|
||||
$serviceContainer->setAdapterClass('thelia', 'mysql');
|
||||
$manager = new ConnectionManagerSingle();
|
||||
|
||||
@@ -215,7 +215,7 @@ class TheliaHttpKernel extends HttpKernel
|
||||
$storage = new Session\Storage\NativeSessionStorage();
|
||||
|
||||
if (Model\ConfigQuery::read("session_config.default")) {
|
||||
$storage->setSaveHandler(new Session\Storage\Handler\NativeFileSessionHandler(Model\ConfigQuery::read("session_config.save_path", THELIA_ROOT . '/local/session/')));
|
||||
$storage->setSaveHandler(new Session\Storage\Handler\NativeFileSessionHandler(Model\ConfigQuery::read("session_config.save_path", THELIA_LOCAL_DIR . 'session/')));
|
||||
} else {
|
||||
$handlerString = Model\ConfigQuery::read("session_config.handlers", 'Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user