fixed isInstalled()
This commit is contained in:
@@ -129,21 +129,15 @@ class Application
|
||||
$cronManager->run();
|
||||
}
|
||||
|
||||
public function isInstalled($useRedirect = true)
|
||||
public function isInstalled()
|
||||
{
|
||||
$config = $this->getContainer()->get('config');
|
||||
|
||||
$result = false;
|
||||
if (file_exists($config->get('configPath')) && $config->get('isInstalled')) {
|
||||
$result = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($useRedirect && !$result) {
|
||||
header("Location: install/");
|
||||
exit;
|
||||
}
|
||||
|
||||
return $result;
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function routeHooks()
|
||||
|
||||
@@ -24,7 +24,10 @@ include "bootstrap.php";
|
||||
|
||||
$app = new \Espo\Core\Application();
|
||||
|
||||
$app->isInstalled();
|
||||
if (!$app->isInstalled()) {
|
||||
header("Location: install/");
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!empty($_GET['entryPoint'])) {
|
||||
$app->runEntryPoint($_GET['entryPoint']);
|
||||
|
||||
@@ -105,7 +105,7 @@ class Installer
|
||||
|
||||
public function isInstalled()
|
||||
{
|
||||
return $this->app->isInstalled(false);
|
||||
return $this->app->isInstalled();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user