From 110f9e3db7ec0a7ac037b9f355092640591770d3 Mon Sep 17 00:00:00 2001 From: rvogel Date: Mon, 3 Dec 2018 11:48:08 +0100 Subject: [PATCH] Save value from CLI installers `--lang` argument This way the value of `--lang` is available to `LocalSettingsGenerator`. Bug: T210998 Change-Id: I8b6bd83603687e4d23fc7e0642c3b8f27157b62d (cherry picked from commit 996ac9f61e34db8b5d50ca9574a021e422cf9030) --- RELEASE-NOTES-1.31 | 3 ++- includes/installer/CliInstaller.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31 index 380eb1d2f0..d76ecd49a8 100644 --- a/RELEASE-NOTES-1.31 +++ b/RELEASE-NOTES-1.31 @@ -40,9 +40,10 @@ THIS IS NOT A RELEASE YET * Require ext-fileinfo in composer.json, per PHPVersionCheck * (T176390) Bundled LocalisationUpdate extension: Handle exceptions from GitHubFetcher * (T208255) Completion search should not change the search query - * (T209870) Fix SQL syntax error in MS-SQL initialisation file for new wikis * (T185049) LogFormatter: Fail softer when trying to link an invalid titles +* (T210998) Properly set $wgLanguageCode in the generated LocalSettings.php + if --lang is used with the command-line installer (install.php). == MediaWiki 1.31.1 == diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index 90ba3c479c..162a978af0 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -72,6 +72,7 @@ class CliInstaller extends Installer { $wgContLang = Language::factory( $option['lang'] ); $wgLang = Language::factory( $option['lang'] ); $wgLanguageCode = $option['lang']; + $this->setVar( 'wgLanguageCode', $wgLanguageCode ); RequestContext::getMain()->setLanguage( $wgLang ); } -- 2.20.1