From ca2fe3d47cbdaf7323d95cd16a34fa06032e754c Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Sun, 6 Nov 2011 01:15:25 +0000 Subject: [PATCH] Make the CliInstaller use --server to set wgServer instead of always setting it to "http://localhost" --- includes/installer/CliInstaller.php | 1 + includes/installer/Installer.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index 002dfcfb63..fb7baa4b59 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -27,6 +27,7 @@ class CliInstaller extends Installer { 'dbport' => 'wgDBport', 'dbschema' => 'wgDBmwschema', 'dbpath' => 'wgSQLiteDataDir', + 'server' => 'wgServer', 'scriptpath' => 'wgScriptPath', ); diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 7b6828333d..d8afba134d 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -853,7 +853,12 @@ abstract class Installer { * Environment check for the server hostname. */ protected function envCheckServer() { - $server = WebRequest::detectServer(); + if ( $this->getVar( 'wgServer' ) ) { + // wgServer was pre-defined, perhaps by the cli installer + $server = $this->getVar( 'wgServer' ); + } else { + $server = WebRequest::detectServer(); + } $this->showMessage( 'config-using-server', $server ); $this->setVar( 'wgServer', $server ); } -- 2.20.1