Optimisation of THELIA_* constants usage
This commit is contained in:
@@ -15,7 +15,7 @@ define('DS' , DIRECTORY_SEPARATOR);
|
||||
|
||||
$loader = require __DIR__ . "/vendor/autoload.php";
|
||||
|
||||
if (!file_exists(THELIA_ROOT . '/local/config/database.yml') && !defined('THELIA_INSTALL_MODE')) {
|
||||
if (!file_exists(THELIA_CONF_DIR . 'database.yml') && !defined('THELIA_INSTALL_MODE')) {
|
||||
$sapi = php_sapi_name();
|
||||
if (substr($sapi, 0, 3) == 'cli') {
|
||||
define('THELIA_INSTALL_MODE', true);
|
||||
@@ -24,4 +24,4 @@ if (!file_exists(THELIA_ROOT . '/local/config/database.yml') && !defined('THELIA
|
||||
header('location: '.$request->getSchemeAndHttpHost() . '/install');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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');
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Taxes rules'}{/block}
|
||||
{block name="page-title"}{intl l='Back-office users'}{/block}
|
||||
|
||||
{block name="check-resource"}admin.configuration.administrator{/block}
|
||||
{block name="check-access"}view{/block}
|
||||
@@ -9,12 +9,12 @@
|
||||
<div>
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
|
||||
<div class="clearfix">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/administrators'}">{intl l="Administrators"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/administrators'}">{intl l="Back-office users"}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="Login"}</th>
|
||||
<th>{intl l="FirstName"}</th>
|
||||
<th>{intl l="LastName"}</th>
|
||||
<th>{intl l="First Name"}</th>
|
||||
<th>{intl l="Last Name"}</th>
|
||||
<th>{intl l="Profile"}</th>
|
||||
<th class="col-md-1">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
{/loop}
|
||||
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user