diff --git a/core/bootstrap.php b/core/bootstrap.php index a75190704..468df2eac 100755 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -17,8 +17,10 @@ $loader = require __DIR__ . "/vendor/autoload.php"; -if (!file_exists(THELIA_ROOT . '/local/config/database.yml')) { - define('THELIA_INSTALL_MODE',true); +if (!file_exists(THELIA_ROOT . '/local/config/database.yml') && !defined('THELIA_INSTALL_MODE')) { + $request = \Thelia\Core\HttpFoundation\Request::createFromGlobals(); + header('location: '.$request->getSchemeAndHttpHost() . '/install'); + exit; } /*else { define('THELIA_INSTALL_MODE',true); diff --git a/core/lib/Thelia/Core/Thelia.php b/core/lib/Thelia/Core/Thelia.php index 199a0bb0b..690e2cd81 100755 --- a/core/lib/Thelia/Core/Thelia.php +++ b/core/lib/Thelia/Core/Thelia.php @@ -96,7 +96,10 @@ class Thelia extends Kernel { parent::boot(); - $this->getContainer()->get("event_dispatcher")->dispatch(TheliaEvents::BOOT); + if (file_exists(THELIA_ROOT . '/local/config/database.yml') === true) { + $this->getContainer()->get("event_dispatcher")->dispatch(TheliaEvents::BOOT); + } + } /** diff --git a/web/cache/.gitkeep b/web/cache/.gitkeep deleted file mode 100755 index e69de29bb..000000000 diff --git a/web/install/bootstrap.php b/web/install/bootstrap.php index 522f6483b..90e395c88 100755 --- a/web/install/bootstrap.php +++ b/web/install/bootstrap.php @@ -20,7 +20,7 @@ /* along with this program. If not, see . */ /* */ /*************************************************************************************/ - +define('THELIA_INSTALL_MODE', true); include __DIR__ . "/../../core/bootstrap.php"; $thelia = new \Thelia\Core\Thelia("install", false); diff --git a/web/test_to_remove/admin-stats.json b/web/test_to_remove/admin-stats.json deleted file mode 100755 index 27a717160..000000000 --- a/web/test_to_remove/admin-stats.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "title" : "Stats on September 2013", - "series" : [ - { - "datas" : [[0,10.00],[1,200.00],[2,5.00],[3,2.75],[4,20.30],[5,14.09],[6,5],[7,23],[8,5],[9,42],[10,0],[11,4],[12,78],[13,75],[14,70],[15,65],[16,102],[17,50],[18,27],[19,35],[20,37],[21,29],[22,56],[23,52],[24,12],[25,6],[26,82],[27,32],[28,15],[29,50],[30,42]], - "color" : "#adadad" - }, - { - "datas" : [[0,2],[1,5],[2,5],[3,7],[4,8],[5,9],[6,5],[7,2],[8,5],[9,4],[10,0],[11,4],[12,7],[13,7],[14,7],[15,6],[16,1],[17,5],[18,2],[19,3],[20,3],[21,2],[22,5],[23,5],[24,1],[25,6],[26,8],[27,3],[28,1],[29,5],[30,4]], - "color" : "#f39922" - }, - { - "datas" : [[0,15],[1,20],[2,1],[3,1],[4,2],[5,3]], - "color" : "#5cb85c" - }, - { - "datas" : [[0,45],[1,40],[2,41],[3,41],[4,42],[5,43]], - "color" : "#5bc0de" - }, - { - "datas" : [[0,25],[1,20],[2,21],[3,21],[4,22],[5,23]], - "color" : "#d9534f" - } - ] -} \ No newline at end of file