Optimisation of THELIA_* constants usage

This commit is contained in:
Franck Allimant
2013-11-08 11:22:26 +01:00
parent 9f211a5dcb
commit 85ea937570
5 changed files with 12 additions and 12 deletions

View File

@@ -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);

View File

@@ -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();

View File

@@ -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');