Return RedirectResponse when it isn't installed

pull/4197/head
Angel Fernando Quiroz Campos 4 years ago
parent 8f752b8d36
commit b33e86e155
  1. 5
      public/index.php

@ -3,6 +3,7 @@
/* For licensing terms, see /license.txt */
use Chamilo\Kernel;
use Symfony\Component\HttpFoundation\RedirectResponse as HttpRedirectResponse;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
@ -10,9 +11,7 @@ return function (array $context) {
// Chamilo
$isInstalled = $context['APP_INSTALLED'] ?? null;
if (1 !== (int) $isInstalled) {
// Does not support subdirectories for now
header('Location: /main/install/index.php');
exit;
return new HttpRedirectResponse('./main/install/index.php');
}
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);

Loading…
Cancel
Save