https://www.mediawiki.org/wiki/Special:Code/MediaWiki/104576

Revision: 104576
Author:   demon
Date:     2011-11-29 17:59:52 +0000 (Tue, 29 Nov 2011)
Log Message:
-----------
Fix r102137. CliInstaller needs to override wgServer, but not in a manner that 
breaks the web installer.

Modified Paths:
--------------
    trunk/phase3/includes/installer/CliInstaller.php
    trunk/phase3/includes/installer/Installer.php

Modified: trunk/phase3/includes/installer/CliInstaller.php
===================================================================
--- trunk/phase3/includes/installer/CliInstaller.php    2011-11-29 16:53:25 UTC 
(rev 104575)
+++ trunk/phase3/includes/installer/CliInstaller.php    2011-11-29 17:59:52 UTC 
(rev 104576)
@@ -183,6 +183,13 @@
                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;

Modified: trunk/phase3/includes/installer/Installer.php
===================================================================
--- trunk/phase3/includes/installer/Installer.php       2011-11-29 16:53:25 UTC 
(rev 104575)
+++ trunk/phase3/includes/installer/Installer.php       2011-11-29 17:59:52 UTC 
(rev 104576)
@@ -855,10 +855,10 @@
        /**
         * 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();
                }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to