From 630ac72aaa3d9a8ae949a8f41c8992d0d82139eb Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Thu, 24 Jan 2013 20:45:16 +0100 Subject: [PATCH] reindente some code verify if config database file exists beforeinitializing Propel --- core/bootstrap.php | 7 +----- core/lib/Thelia/Core/Thelia.php | 38 ++++++++++----------------------- web/index.php | 2 +- web/index_dev.php | 2 +- 4 files changed, 14 insertions(+), 35 deletions(-) diff --git a/core/bootstrap.php b/core/bootstrap.php index c0703656f..b18d7166f 100644 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -1,9 +1,5 @@ isDebug()) { @@ -64,35 +67,16 @@ class Thelia extends Kernel $con->useDebug(true); } } + /** - * Initializes the service container. - * - * @TODO cache container initialization - * - * The cached version of the service container is used when fresh, otherwise the - * container is built. + * + * Load some configuration + * Initialize all plugins + * */ -// protected function initializeContainer() -// { -// $class = $this->getContainerClass(); -// $cache = new ConfigCache($this->getCacheDir().'/'.$class.'.php', $this->debug); -// $fresh = true; -// if (!$cache->isFresh()) { -// $container = $this->buildContainer(); -// $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass()); -// -// $fresh = false; -// } -// -// require_once $cache; -// -// $this->container = new $class(); -// -// if (!$fresh && $this->container->has('cache_warmer')) { -// $this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir')); -// } -// -// } + public function loadConfiguration(){ + + } /** * Gets the cache directory. diff --git a/web/index.php b/web/index.php index b711664aa..404949dc3 100644 --- a/web/index.php +++ b/web/index.php @@ -10,7 +10,7 @@ require __DIR__ . '/../core/bootstrap.php'; $request = Request::createFromGlobals(); -$thelia = new Thelia($env, false); +$thelia = new Thelia("prod", false); $response = $thelia->handle($request)->prepare($request)->send(); diff --git a/web/index_dev.php b/web/index_dev.php index a594309e3..f5898f61a 100644 --- a/web/index_dev.php +++ b/web/index_dev.php @@ -19,7 +19,7 @@ if ( false === in_array($request->getClientIp(), $trustIp)) { //change request to send to a 404 error page } -$thelia = new Thelia($env, true); +$thelia = new Thelia("dev", true); $response = $thelia->handle($request)->prepare($request)->send();