X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FInstall.php;h=3ad38041e194a36b1ed75a97374feafce18d3910;hb=1792046a4f270f15d904d591c1e9eb0444ff2349;hp=e20d80f2055bb6351a57ddf02c5b36b38c692f7c;hpb=d6efc901946c91cf26a4436c4b58b1636e4bc9c9;p=friendica.git diff --git a/src/Module/Install.php b/src/Module/Install.php index e20d80f205..3ad38041e1 100644 --- a/src/Module/Install.php +++ b/src/Module/Install.php @@ -1,11 +1,30 @@ . + * + */ namespace Friendica\Module; use Friendica\App; use Friendica\BaseModule; use Friendica\Core; -use Friendica\Core\Config\Cache\ConfigCache; +use Friendica\Core\Config\Cache; use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Network\HTTPException; @@ -167,9 +186,13 @@ class Install extends BaseModule $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 "INSTALL.txt".'), + '$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, @@ -196,12 +219,12 @@ class Install extends BaseModule 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.'), - 'required'], + 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."), - 'required'], + DI::l10n()->t('Required')], '$urlpath' => ['system-urlpath', DI::l10n()->t('Sub path of the URL'), $configCache->get('system', 'urlpath'), @@ -220,7 +243,9 @@ class Install extends BaseModule '$info_01' => DI::l10n()->t('In order to install Friendica we need to know how to connect to your database.'), '$info_02' => DI::l10n()->t('Please contact your hosting provider or site administrator if you have questions about these settings.'), '$info_03' => DI::l10n()->t('The database you specify below should already exist. If it does not, please create it before continuing.'), - 'checks' => self::$installer->getChecks(), + '$required' => DI::l10n()->t('Required'), + '$requirement_not_satisfied' => DI::l10n()->t('Requirement not satisfied'), + '$checks' => self::$installer->getChecks(), '$hostname' => $configCache->get('config', 'hostname'), '$ssl_policy' => $configCache->get('system', 'ssl_policy'), '$basepath' => $configCache->get('system', 'basepath'), @@ -229,23 +254,23 @@ class Install extends BaseModule DI::l10n()->t('Database Server Name'), $configCache->get('database', 'hostname'), '', - 'required'], + DI::l10n()->t('Required')], '$dbuser' => ['database-username', DI::l10n()->t('Database Login Name'), $configCache->get('database', 'username'), '', - 'required', + DI::l10n()->t('Required'), 'autofocus'], '$dbpass' => ['database-password', DI::l10n()->t('Database Login Password'), $configCache->get('database', 'password'), DI::l10n()->t("For security reasons the password must not be empty"), - 'required'], + DI::l10n()->t('Required')], '$dbdata' => ['database-database', DI::l10n()->t('Database Name'), $configCache->get('database', 'database'), '', - 'required'], + DI::l10n()->t('Required')], '$lbl_10' => DI::l10n()->t('Please select a default timezone for your website'), '$php_path' => $configCache->get('config', 'php_path'), '$submit' => DI::l10n()->t('Submit') @@ -259,6 +284,7 @@ class Install extends BaseModule $tpl = Renderer::getMarkupTemplate('install_settings.tpl'); $output .= Renderer::replaceMacros($tpl, [ '$title' => $install_title, + '$required' => DI::l10n()->t('Required'), '$checks' => self::$installer->getChecks(), '$pass' => DI::l10n()->t('Site settings'), '$hostname' => $configCache->get('config', 'hostname'), @@ -273,7 +299,7 @@ class Install extends BaseModule DI::l10n()->t('Site administrator email address'), $configCache->get('config', 'admin_email'), DI::l10n()->t('Your account email address must match this in order to use the web admin panel.'), - 'required', 'autofocus', 'email'], + DI::l10n()->t('Required'), 'autofocus', 'email'], '$timezone' => Temporal::getTimezoneField('system-default_timezone', DI::l10n()->t('Please select a default timezone for your website'), $configCache->get('system', 'default_timezone'), @@ -299,10 +325,12 @@ class Install extends BaseModule $tpl = Renderer::getMarkupTemplate('install_finished.tpl'); $output .= Renderer::replaceMacros($tpl, [ - '$title' => $install_title, - '$checks' => self::$installer->getChecks(), - '$pass' => DI::l10n()->t('Installation finished'), - '$text' => $db_return_text . self::whatNext(), + '$title' => $install_title, + '$required' => DI::l10n()->t('Required'), + '$requirement_not_satisfied' => DI::l10n()->t('Requirement not satisfied'), + '$checks' => self::$installer->getChecks(), + '$pass' => DI::l10n()->t('Installation finished'), + '$text' => $db_return_text . self::whatNext(), ]); break; @@ -332,13 +360,13 @@ class Install extends BaseModule /** * Checks the $_POST settings and updates the config Cache for it * - * @param ConfigCache $configCache The current config cache + * @param Cache $configCache The current config cache * @param array $post The $_POST data * @param string $cat The category of the setting * @param string $key The key of the setting * @param null|string $default The default value */ - private static function checkSetting(ConfigCache $configCache, array $post, $cat, $key, $default = null) + private static function checkSetting(Cache $configCache, array $post, $cat, $key, $default = null) { $configCache->set($cat, $key, Strings::escapeTags(