Fix r102137. CliInstaller needs to override wgServer, but not in a manner that breaks...
authorChad Horohoe <demon@users.mediawiki.org>
Tue, 29 Nov 2011 17:59:52 +0000 (17:59 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Tue, 29 Nov 2011 17:59:52 +0000 (17:59 +0000)
includes/installer/CliInstaller.php
includes/installer/Installer.php

index fb7baa4..2dbeefe 100644 (file)
@@ -183,6 +183,13 @@ class CliInstaller extends Installer {
                return parent::envCheckPath();
        }
 
+       protected function envCheckServer( $srv = null ) {
+               if ( $this->getVar( 'wgServer' ) ) {
+                       $srv = $this->getVar( 'wgServer' );
+               }
+               return parent::envCheckServer( $srv );
+       }
+
        public function dirIsExecutable( $dir, $url ) {
                $this->showMessage( 'config-no-cli-uploads-check', $dir );
                return false;
index b0b40fc..f951766 100644 (file)
@@ -855,10 +855,10 @@ abstract class Installer {
        /**
         * Environment check for the server hostname.
         */
-       protected function envCheckServer() {
-               if ( $this->getVar( 'wgServer' ) ) {
+       protected function envCheckServer( $srv = null ) {
+               if ( $srv ) {
                        // wgServer was pre-defined, perhaps by the cli installer
-                       $server = $this->getVar( 'wgServer' );
+                       $server = $srv;
                } else {
                        $server = WebRequest::detectServer();
                }