Optimisation of THELIA_* constants usage
This commit is contained in:
@@ -15,7 +15,7 @@ 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_CONF_DIR . 'database.yml') && !defined('THELIA_INSTALL_MODE')) {
|
||||||
$sapi = php_sapi_name();
|
$sapi = php_sapi_name();
|
||||||
if (substr($sapi, 0, 3) == 'cli') {
|
if (substr($sapi, 0, 3) == 'cli') {
|
||||||
define('THELIA_INSTALL_MODE', true);
|
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');
|
header('location: '.$request->getSchemeAndHttpHost() . '/install');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -180,8 +180,8 @@ class Install extends ContainerAwareCommand
|
|||||||
{
|
{
|
||||||
$fs = new Filesystem();
|
$fs = new Filesystem();
|
||||||
|
|
||||||
$sampleConfigFile = THELIA_ROOT . "/local/config/database.yml.sample";
|
$sampleConfigFile = THELIA_CONF_DIR . "database.yml.sample";
|
||||||
$configFile = THELIA_ROOT . "/local/config/database.yml";
|
$configFile = THELIA_CONF_DIR . "database.yml";
|
||||||
|
|
||||||
$fs->copy($sampleConfigFile, $configFile, true);
|
$fs->copy($sampleConfigFile, $configFile, true);
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class Thelia extends Kernel
|
|||||||
}
|
}
|
||||||
|
|
||||||
$definePropel = new DefinePropel(new DatabaseConfiguration(),
|
$definePropel = new DefinePropel(new DatabaseConfiguration(),
|
||||||
Yaml::parse(THELIA_ROOT . '/local/config/database.yml'));
|
Yaml::parse(THELIA_CONF_DIR . 'database.yml'));
|
||||||
$serviceContainer = Propel::getServiceContainer();
|
$serviceContainer = Propel::getServiceContainer();
|
||||||
$serviceContainer->setAdapterClass('thelia', 'mysql');
|
$serviceContainer->setAdapterClass('thelia', 'mysql');
|
||||||
$manager = new ConnectionManagerSingle();
|
$manager = new ConnectionManagerSingle();
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ class TheliaHttpKernel extends HttpKernel
|
|||||||
$storage = new Session\Storage\NativeSessionStorage();
|
$storage = new Session\Storage\NativeSessionStorage();
|
||||||
|
|
||||||
if (Model\ConfigQuery::read("session_config.default")) {
|
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 {
|
} else {
|
||||||
$handlerString = Model\ConfigQuery::read("session_config.handlers", 'Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler');
|
$handlerString = Model\ConfigQuery::read("session_config.handlers", 'Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler');
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{extends file="admin-layout.tpl"}
|
{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-resource"}admin.configuration.administrator{/block}
|
||||||
{block name="check-access"}view{/block}
|
{block name="check-access"}view{/block}
|
||||||
@@ -9,12 +9,12 @@
|
|||||||
<div>
|
<div>
|
||||||
|
|
||||||
<div id="wrapper" class="container">
|
<div id="wrapper" class="container">
|
||||||
|
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
<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'}">{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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -37,8 +37,8 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{intl l="Login"}</th>
|
<th>{intl l="Login"}</th>
|
||||||
<th>{intl l="FirstName"}</th>
|
<th>{intl l="First Name"}</th>
|
||||||
<th>{intl l="LastName"}</th>
|
<th>{intl l="Last Name"}</th>
|
||||||
<th>{intl l="Profile"}</th>
|
<th>{intl l="Profile"}</th>
|
||||||
<th class="col-md-1">{intl l="Actions"}</th>
|
<th class="col-md-1">{intl l="Actions"}</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
|
|
||||||
{/loop}
|
{/loop}
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user