Save value from CLI installers `--lang` argument
authorrvogel <vogel@hallowelt.biz>
Mon, 3 Dec 2018 10:48:08 +0000 (11:48 +0100)
committerKunal Mehta <legoktm@member.fsf.org>
Tue, 4 Dec 2018 07:03:03 +0000 (23:03 -0800)
This way the value of `--lang` is available to `LocalSettingsGenerator`.

Bug: T210998
Change-Id: I8b6bd83603687e4d23fc7e0642c3b8f27157b62d
(cherry picked from commit 996ac9f61e34db8b5d50ca9574a021e422cf9030)

RELEASE-NOTES-1.31
includes/installer/CliInstaller.php

index 380eb1d..d76ecd4 100644 (file)
@@ -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 ==
 
index 90ba3c4..162a978 100644 (file)
@@ -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 );
                }