Merge "Indicate the actual version of HHVM in use"
[lhc/web/wiklou.git] / includes / installer / WebInstaller.php
index 89d50f8..3a3e809 100644 (file)
@@ -148,7 +148,7 @@ class WebInstaller extends Installer {
        /**
         * Main entry point.
         *
-        * @param array[] $session initial session array
+        * @param array[] $session Initial session array
         *
         * @return array[] New session array
         */
@@ -667,7 +667,7 @@ class WebInstaller extends Installer {
         * Get HTML for an info box with an icon.
         *
         * @param string $text Wikitext, get this with wfMessage()->plain()
-        * @param string|bool $icon Icon name, file in skins/common/images. Default: false
+        * @param string|bool $icon Icon name, file in mw-config/images. Default: false
         * @param string|bool $class Additional class name to add to the wrapper div. Default: false.
         *
         * @return string
@@ -675,8 +675,8 @@ class WebInstaller extends Installer {
        public function getInfoBox( $text, $icon = false, $class = false ) {
                $text = $this->parse( $text, true );
                $icon = ( $icon == false ) ?
-                       '../skins/common/images/info-32.png' :
-                       '../skins/common/images/' . $icon;
+                       'images/info-32.png' :
+                       'images/' . $icon;
                $alt = wfMessage( 'config-information' )->text();
 
                return Html::infoBox( $text, $icon, $alt, $class, false );
@@ -729,6 +729,16 @@ class WebInstaller extends Installer {
                $this->output->addHTML( $html );
        }
 
+       /**
+        * @param Status $status
+        */
+       public function showStatusMessage( Status $status ) {
+               $errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() );
+               foreach ( $errors as $error ) {
+                       call_user_func_array( array( $this, 'showMessage' ), $error );
+               }
+       }
+
        /**
         * Label a control by wrapping a config-input div around it and putting a
         * label before it.
@@ -1066,7 +1076,11 @@ class WebInstaller extends Installer {
                $newValues = array();
 
                foreach ( $varNames as $name ) {
-                       $value = trim( $this->request->getVal( $prefix . $name ) );
+                       $value = $this->request->getVal( $prefix . $name );
+                       // bug 30524, do not trim passwords
+                       if ( stripos( $name, 'password' ) === false ) {
+                               $value = trim( $value );
+                       }
                        $newValues[$name] = $value;
 
                        if ( $value === null ) {