Fix typo of Minimum in variable name
[lhc/web/wiklou.git] / includes / installer / CliInstaller.php
index f59b5da..c008333 100644 (file)
@@ -72,6 +72,7 @@ class CliInstaller extends Installer {
                        global $wgLang, $wgLanguageCode;
                        $this->setVar( '_UserLang', $options['lang'] );
                        $wgLanguageCode = $options['lang'];
+                       $this->setVar( 'wgLanguageCode', $wgLanguageCode );
                        $wgContLang = MediaWikiServices::getInstance()->getContentLanguage();
                        $wgLang = Language::factory( $options['lang'] );
                        RequestContext::getMain()->setLanguage( $wgLang );
@@ -199,24 +200,23 @@ class CliInstaller extends Installer {
                $this->showMessage( 'config-install-step-done' );
        }
 
-       public function showMessage( $msg /*, ... */ ) {
-               echo $this->getMessageText( func_get_args() ) . "\n";
+       public function showMessage( $msg, ...$params ) {
+               echo $this->getMessageText( $msg, $params ) . "\n";
                flush();
        }
 
-       public function showError( $msg /*, ... */ ) {
-               echo "***{$this->getMessageText( func_get_args() )}***\n";
+       public function showError( $msg, ...$params ) {
+               echo "***{$this->getMessageText( $msg, $params )}***\n";
                flush();
        }
 
        /**
+        * @param string $msg
         * @param array $params
         *
         * @return string
         */
-       protected function getMessageText( $params ) {
-               $msg = array_shift( $params );
-
+       protected function getMessageText( $msg, $params ) {
                $text = wfMessage( $msg, $params )->parse();
 
                $text = preg_replace( '/<a href="(.*?)".*?>(.*?)<\/a>/', '$2 &lt;$1&gt;', $text );