Merge "Revert "Convert Special:EmailUser to use OOUIHTMLForm""
[lhc/web/wiklou.git] / includes / installer / WebInstaller.php
index 67a4def..e8433f2 100644 (file)
@@ -159,7 +159,6 @@ class WebInstaller extends Installer {
                        $this->settings = $session['settings'] + $this->settings;
                }
 
-               $this->exportVars();
                $this->setupLanguage();
 
                if ( ( $this->getVar( '_InstallDone' ) || $this->getVar( '_UpgradeDone' ) )
@@ -387,15 +386,19 @@ class WebInstaller extends Installer {
        }
 
        /**
-        * Show an error message in a box. Parameters are like wfMessage().
-        * @param string $msg
+        * Show an error message in a box. Parameters are like wfMessage(), or
+        * alternatively, pass a Message object in.
+        * @param string|Message $msg
         */
        public function showError( $msg /*...*/ ) {
-               $args = func_get_args();
-               array_shift( $args );
-               $args = array_map( 'htmlspecialchars', $args );
-               $msg = wfMessage( $msg, $args )->useDatabase( false )->plain();
-               $this->output->addHTML( $this->getErrorBox( $msg ) );
+               if ( !( $msg instanceof Message ) ) {
+                       $args = func_get_args();
+                       array_shift( $args );
+                       $args = array_map( 'htmlspecialchars', $args );
+                       $msg = wfMessage( $msg, $args );
+               }
+               $text = $msg->useDatabase( false )->plain();
+               $this->output->addHTML( $this->getErrorBox( $text ) );
        }
 
        /**