- case self::DATABASE_CONFIG:
- $dbhost = notags(trim(defaults($_POST, 'dbhost' , self::DEFAULT_HOST)));
- $dbuser = notags(trim(defaults($_POST, 'dbuser' , '')));
- $dbpass = notags(trim(defaults($_POST, 'dbpass' , '')));
- $dbdata = notags(trim(defaults($_POST, 'dbdata' , '')));
- $phpath = notags(trim(defaults($_POST, 'phpath' , '')));
- $adminmail = notags(trim(defaults($_POST, 'adminmail', '')));
-
- $tpl = get_markup_template('install_db.tpl');
- $output .= replace_macros($tpl, [
- '$title' => $install_title,
- '$pass' => L10n::t('Database connection'),
- '$info_01' => L10n::t('In order to install Friendica we need to know how to connect to your database.'),
- '$info_02' => L10n::t('Please contact your hosting provider or site administrator if you have questions about these settings.'),
- '$info_03' => L10n::t('The database you specify below should already exist. If it does not, please create it before continuing.'),
- '$status' => $wizard_status,
- '$dbhost' => ['dbhost',
- L10n::t('Database Server Name'),
- $dbhost,
- '',
- 'required'],
- '$dbuser' => ['dbuser',
- L10n::t('Database Login Name'),
- $dbuser,
- '',
- 'required',
- 'autofocus'],
- '$dbpass' => ['dbpass',
- L10n::t('Database Login Password'),
- $dbpass,
- L10n::t("For security reasons the password must not be empty"),
- 'required'],
- '$dbdata' => ['dbdata',
- L10n::t('Database Name'),
- $dbdata,
- '',
- 'required'],
- '$adminmail' => ['adminmail',
- L10n::t('Site administrator email address'),
- $adminmail,
- L10n::t('Your account email address must match this in order to use the web admin panel.'),
- 'required',
- 'autofocus',
- 'email'],
- '$lbl_10' => L10n::t('Please select a default timezone for your website'),
- '$baseurl' => $a->getBaseURL(),
- '$phpath' => $phpath,
- '$submit' => L10n::t('Submit')
+ case self::BASE_CONFIG:
+ $ssl_choices = [
+ App\BaseURL::SSL_POLICY_NONE => L10n::t("No SSL policy, links will track page SSL state"),
+ App\BaseURL::SSL_POLICY_FULL => L10n::t("Force all links to use SSL"),
+ App\BaseURL::SSL_POLICY_SELFSIGN => 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' => L10n::t('Base settings'),
+ '$ssl_policy' => ['system-ssl_policy',
+ L10n::t("SSL link policy"),
+ $configCache->get('system', 'ssl_policy'),
+ L10n::t("Determines whether generated links should be forced to use SSL"),
+ $ssl_choices],
+ '$hostname' => ['config-hostname',
+ L10n::t('Host name'),
+ $configCache->get('config', 'hostname'),
+ L10n::t('Overwrite this field in case the determinated hostname isn\'t right, otherweise leave it as is.'),
+ 'required'],
+ '$basepath' => ['system-basepath',
+ L10n::t("Base path to installation"),
+ $configCache->get('system', 'basepath'),
+ 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."),
+ 'required'],
+ '$urlpath' => ['system-urlpath',
+ L10n::t('Sub path of the URL'),
+ $configCache->get('system', 'urlpath'),
+ 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' => L10n::t('Submit'),