From 245567acfc57ee7fb40475161ce1e27294d9bf41 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 29 Nov 2011 17:59:52 +0000 Subject: [PATCH] Fix r102137. CliInstaller needs to override wgServer, but not in a manner that breaks the web installer. --- includes/installer/CliInstaller.php | 7 +++++++ includes/installer/Installer.php | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) 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(); } -- 2.20.1