* @ingroup Deployment
*/
+use MediaWiki\MediaWikiServices;
+
/**
* Class for the core installer command line interface.
*
'dbpass' => 'wgDBpassword',
'dbprefix' => 'wgDBprefix',
'dbtableoptions' => 'wgDBTableOptions',
- 'dbmysql5' => 'wgDBmysql5',
'dbport' => 'wgDBport',
'dbschema' => 'wgDBmwschema',
'dbpath' => 'wgSQLiteDataDir',
/**
* @param string $siteName
- * @param string $admin
+ * @param string|null $admin
* @param array $option
*/
function __construct( $siteName, $admin = null, array $option = [] ) {
if ( isset( $option['lang'] ) ) {
global $wgLang, $wgLanguageCode;
$this->setVar( '_UserLang', $option['lang'] );
- $wgContLang = Language::factory( $option['lang'] );
- $wgLang = Language::factory( $option['lang'] );
$wgLanguageCode = $option['lang'];
+ $wgContLang = MediaWikiServices::getInstance()->getContentLanguage();
+ $wgLang = Language::factory( $option['lang'] );
RequestContext::getMain()->setLanguage( $wgLang );
}
if ( count( $warnings ) !== 0 ) {
foreach ( $warnings as $w ) {
- call_user_func_array( [ $this, 'showMessage' ], $w );
+ $this->showMessage( ...$w );
}
}