addLoader("php", new Symfony\Component\Translation\Loader\PhpFileLoader()); $trans->addResource('php', __DIR__.'/I18n/'.$_SESSION['install']['lang'].'.php', $_SESSION['install']['lang']); if (!isset($context)) { $context = 'install'; } // Check if we store is already configured and if we have to switch on an update process if ($context == "install" && $step == 1) { try { $checkPermission = new \Thelia\Install\CheckPermission(true, $trans); $isValid = $checkPermission->exec(); $validationMessage = $checkPermission->getValidationMessages(); } catch (\Thelia\Install\Exception\AlreadyInstallException $ex) { $update = new \Thelia\Install\Update(false); if (!$update->isLatestVersion()) { $updateLocation = str_replace('/index.php', '', $_SERVER["REQUEST_URI"]) . '/update.php'; header("Location: " . $updateLocation); die(); } } } ?>