X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FMaintenance.php;h=13fee9c6ca30eb2a0ca79331943148f987c472ad;hb=82ffec0c97354a7694eb1758ef943f312ed64f0e;hp=cb95fa7ca2ad7843f11727a6d53be3ae03bb9ae8;hpb=2fe97b078ab83af56bf00efe288434af389f03a7;p=lhc%2Fweb%2Fwiklou.git 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;