From: jenkins-bot Date: Thu, 12 Apr 2018 18:56:42 +0000 (+0000) Subject: Merge "maintenance: Document secondary purpose of --server" X-Git-Tag: 1.31.0-rc.0~98 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=9b670fb797813a8ed35750e2c83fe953a10f349e;hp=60392920a7e24da5b04a5cdb62197e5487feba36 Merge "maintenance: Document secondary purpose of --server" --- diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index cb95fa7ca2..13fee9c6ca 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -1215,6 +1215,12 @@ abstract class Maintenance { } define( 'MW_DB', $bits[0] ); define( 'MW_PREFIX', $bits[1] ); + } elseif ( isset( $this->mOptions['server'] ) ) { + // Provide the option for site admins to detect and configure + // multiple wikis based on server names. This offers --server + // as alternative to --wiki. + // See https://www.mediawiki.org/wiki/Manual:Wiki_family + $_SERVER['SERVER_NAME'] = $this->mOptions['server']; } if ( !is_readable( $settingsFile ) ) { @@ -1222,9 +1228,6 @@ abstract class Maintenance { "must exist and be readable in the source directory.\n" . "Use --conf to specify it." ); } - if ( isset( $this->mOptions['server'] ) ) { - $_SERVER['SERVER_NAME'] = $this->mOptions['server']; - } $wgCommandLineMode = true; return $settingsFile;