r104576 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104575‎ | r104576 | r104577 >
Date:17:59, 29 November 2011
Author:demon
Status:resolved (Comments)
Tags:
Comment:
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 (modified) (history)
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/CliInstaller.php
@@ -183,6 +183,13 @@
184184 return parent::envCheckPath();
185185 }
186186
 187+ protected function envCheckServer( $srv = null ) {
 188+ if ( $this->getVar( 'wgServer' ) ) {
 189+ $srv = $this->getVar( 'wgServer' );
 190+ }
 191+ return parent::envCheckServer( $srv );
 192+ }
 193+
187194 public function dirIsExecutable( $dir, $url ) {
188195 $this->showMessage( 'config-no-cli-uploads-check', $dir );
189196 return false;
Index: trunk/phase3/includes/installer/Installer.php
@@ -855,10 +855,10 @@
856856 /**
857857 * Environment check for the server hostname.
858858 */
859 - protected function envCheckServer() {
860 - if ( $this->getVar( 'wgServer' ) ) {
 859+ protected function envCheckServer( $srv = null ) {
 860+ if ( $srv ) {
861861 // wgServer was pre-defined, perhaps by the cli installer
862 - $server = $this->getVar( 'wgServer' );
 862+ $server = $srv;
863863 } else {
864864 $server = WebRequest::detectServer();
865865 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r105885Separate Cli/Web logic for envCheckServer() per CR on r104576demon15:11, 12 December 2011
r107910MFT r105010, r104671, r104576, r102137reedy17:53, 3 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102137Make the CliInstaller use --server to set wgServer instead of always setting ...dantman01:15, 6 November 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   23:10, 1 December 2011

Shouldn't this just be implemented differently between WebInstaller and CliInstaller? Why would the Installer base class even be checking these things?

Status & tagging log