Moved FileBackendStore and helper classes to their own file (no code changes). Update...
[lhc/web/wiklou.git] / includes / installer / WebInstaller.php
index 7427906..c340d9a 100644 (file)
@@ -433,6 +433,7 @@ class WebInstaller extends Installer {
         *
         * @param $name String
         * @param $default
+        * @return null
         */
        public function getSession( $name, $default = null ) {
                if ( !isset( $this->session[$name] ) ) {
@@ -472,7 +473,6 @@ class WebInstaller extends Installer {
                        $this->setVar( '_UserLang', $wgLanguageCode );
                } else {
                        $wgLanguageCode = $this->getVar( 'wgLanguageCode' );
-                       $wgLang = Language::factory( $this->getVar( '_UserLang' ) );
                        $wgContLang = Language::factory( $wgLanguageCode );
                }
        }
@@ -678,12 +678,10 @@ class WebInstaller extends Installer {
         * @param $status Status
         */
        public function showStatusMessage( Status $status ) {
-               $text = $status->getWikiText();
-               $this->output->addWikiText(
-                       "<div class=\"config-message\">\n" .
-                       $text .
-                       "</div>"
-               );
+               $errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() );
+               foreach ( $errors as $error ) {
+                       call_user_func_array( array( $this, 'showMessage' ), $error );
+               }
        }
 
        /**
@@ -1068,6 +1066,9 @@ class WebInstaller extends Installer {
                return Html::rawElement( 'div', array( 'class' => 'config-download-link' ), $anchor );
        }
 
+       /**
+        * @return bool
+        */
        public function envCheckPath( ) {
                // PHP_SELF isn't available sometimes, such as when PHP is CGI but
                // cgi.fix_pathinfo is disabled. In that case, fall back to SCRIPT_NAME
@@ -1085,9 +1086,10 @@ class WebInstaller extends Installer {
                        $this->showError( 'config-no-uri' );
                        return false;
                }
-
-
                return parent::envCheckPath();
        }
 
+       protected function envGetDefaultServer() {
+               return WebRequest::detectServer();
+       }
 }