Swap SET and WHERE statements in ChangeTags::undefineTag
[lhc/web/wiklou.git] / includes / installer / CliInstaller.php
index 715f5df..aee51e7 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup Deployment
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Class for the core installer command line interface.
  *
@@ -38,7 +40,6 @@ class CliInstaller extends Installer {
                'dbpass' => 'wgDBpassword',
                'dbprefix' => 'wgDBprefix',
                'dbtableoptions' => 'wgDBTableOptions',
-               'dbmysql5' => 'wgDBmysql5',
                'dbport' => 'wgDBport',
                'dbschema' => 'wgDBmwschema',
                'dbpath' => 'wgSQLiteDataDir',
@@ -48,7 +49,7 @@ class CliInstaller extends Installer {
 
        /**
         * @param string $siteName
-        * @param string $admin
+        * @param string|null $admin
         * @param array $option
         */
        function __construct( $siteName, $admin = null, array $option = [] ) {
@@ -70,9 +71,9 @@ class CliInstaller extends Installer {
                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 );
                }
 
@@ -97,7 +98,7 @@ class CliInstaller extends Installer {
                        $this->setVar( '_InstallUser',
                                $option['installdbuser'] );
                        $this->setVar( '_InstallPassword',
-                               isset( $option['installdbpass'] ) ? $option['installdbpass'] : "" );
+                               $option['installdbpass'] ?? "" );
 
                        // Assume that if we're given the installer user, we'll create the account.
                        $this->setVar( '_CreateDBAccount', true );
@@ -198,7 +199,7 @@ class CliInstaller extends Installer {
 
                if ( count( $warnings ) !== 0 ) {
                        foreach ( $warnings as $w ) {
-                               call_user_func_array( [ $this, 'showMessage' ], $w );
+                               $this->showMessage( ...$w );
                        }
                }