- $phppath = defaults($_POST, 'phpath', null);
-
- $status = self::$installer->checkEnvironment($a->getBaseURL(), $phppath);
-
- $tpl = get_markup_template('install_checks.tpl');
- $output .= replace_macros($tpl, [
- '$title' => $install_title,
- '$pass' => L10n::t('System check'),
- '$checks' => self::$installer->getChecks(),
- '$passed' => $status,
- '$see_install' => L10n::t('Please see the file "Install.txt".'),
- '$next' => L10n::t('Next'),
- '$reload' => L10n::t('Check again'),
- '$phpath' => $phppath,
- '$baseurl' => $a->getBaseURL()
+ $php_path = $configCache->get('config', 'php_path');
+
+ $status = self::$installer->checkEnvironment(DI::baseUrl()->get(), $php_path);
+
+ $tpl = Renderer::getMarkupTemplate('install_checks.tpl');
+ $output .= Renderer::replaceMacros($tpl, [
+ '$title' => $install_title,
+ '$pass' => DI::l10n()->t('System check'),
+ '$required' => DI::l10n()->t('Required'),
+ '$requirement_not_satisfied' => DI::l10n()->t('Requirement not satisfied'),
+ '$optional_requirement_not_satisfied' => DI::l10n()->t('Optional requirement not satisfied'),
+ '$ok' => DI::l10n()->t('OK'),
+ '$checks' => self::$installer->getChecks(),
+ '$passed' => $status,
+ '$see_install' => DI::l10n()->t('Please see the file "doc/INSTALL.md".'),
+ '$next' => DI::l10n()->t('Next'),
+ '$reload' => DI::l10n()->t('Check again'),
+ '$php_path' => $php_path,
+ ]);
+ break;
+
+ case self::BASE_CONFIG:
+ $ssl_choices = [
+ App\BaseURL::SSL_POLICY_NONE => DI::l10n()->t("No SSL policy, links will track page SSL state"),
+ App\BaseURL::SSL_POLICY_FULL => DI::l10n()->t("Force all links to use SSL"),
+ App\BaseURL::SSL_POLICY_SELFSIGN => DI::l10n()->t("Self-signed certificate, use SSL for local links only \x28discouraged\x29")
+ ];
+
+ $tpl = Renderer::getMarkupTemplate('install_base.tpl');
+ $output .= Renderer::replaceMacros($tpl, [
+ '$title' => $install_title,
+ '$pass' => DI::l10n()->t('Base settings'),
+ '$ssl_policy' => ['system-ssl_policy',
+ DI::l10n()->t("SSL link policy"),
+ $configCache->get('system', 'ssl_policy'),
+ DI::l10n()->t("Determines whether generated links should be forced to use SSL"),
+ $ssl_choices],
+ '$hostname' => ['config-hostname',
+ DI::l10n()->t('Host name'),
+ $configCache->get('config', 'hostname'),
+ DI::l10n()->t('Overwrite this field in case the determinated hostname isn\'t right, otherweise leave it as is.'),
+ DI::l10n()->t('Required')],
+ '$basepath' => ['system-basepath',
+ DI::l10n()->t("Base path to installation"),
+ $configCache->get('system', 'basepath'),
+ DI::l10n()->t("If the system cannot detect the correct path to your installation, enter the correct path here. This setting should only be set if you are using a restricted system and symbolic links to your webroot."),
+ DI::l10n()->t('Required')],
+ '$urlpath' => ['system-urlpath',
+ DI::l10n()->t('Sub path of the URL'),
+ $configCache->get('system', 'urlpath'),
+ DI::l10n()->t('Overwrite this field in case the sub path determination isn\'t right, otherwise leave it as is. Leaving this field blank means the installation is at the base URL without sub path.'),
+ ''],
+ '$php_path' => $configCache->get('config', 'php_path'),
+ '$submit' => DI::l10n()->t('Submit'),