From 9f8edcd1b104a4ee6a7075e8d28818de71708105 Mon Sep 17 00:00:00 2001 From: Taras Machyshyn Date: Mon, 3 Mar 2014 13:10:53 +0200 Subject: [PATCH] changes instalation checking --- application/Espo/Core/Application.php | 9 +++++++++ index.php | 6 +----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/application/Espo/Core/Application.php b/application/Espo/Core/Application.php index 44fd3c391e..eff2672d6f 100644 --- a/application/Espo/Core/Application.php +++ b/application/Espo/Core/Application.php @@ -97,6 +97,15 @@ class Application $cronManager = new \Espo\Core\CronManager($this->container); $cronManager->run(); } + + public function isInstalled() + { + $configFile = $this->getContainer()->get('config')->get('configPath'); + if (!file_exists($configFile)) { + header("Location: install/"); + exit; + } + } protected function routeHooks() { diff --git a/index.php b/index.php index 29421df556..32cef0c98a 100644 --- a/index.php +++ b/index.php @@ -4,11 +4,7 @@ include "bootstrap.php"; $app = new \Espo\Core\Application(); -$configFile = $app->getContainer()->get('config')->get('configPath'); -if (!file_exists($configFile)) { - header("Location: install/"); - exit; -} +$app->isInstalled(); if (empty($_GET['entryPoint'])) { include "main.html";