From: Chad Horohoe Date: Tue, 29 Nov 2011 17:59:52 +0000 (+0000) Subject: Fix r102137. CliInstaller needs to override wgServer, but not in a manner that breaks... X-Git-Tag: 1.31.0-rc.0~26229 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=245567acfc57ee7fb40475161ce1e27294d9bf41;p=lhc%2Fweb%2Fwiklou.git Fix r102137. CliInstaller needs to override wgServer, but not in a manner that breaks the web installer. --- diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index fb7baa4b59..2dbeefe3f0 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -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; diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index b0b40fc7dc..f95176653c 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -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(); }