X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%2C%22id_auteur=%24connecte%22%29%20.%20%22?a=blobdiff_plain;f=maintenance%2FMaintenance.php;h=624bbae8cc3278aa3ab0bae5c215e40d603fd208;hb=af46a3351c0a392f9d8e14291bd622475d1ec33c;hp=0c79bd51e523b030480993058ade78ee293d94c1;hpb=71a653a495cf2de243ff25d5941ae708f0e43a80;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 0c79bd51e5..624bbae8cc 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -1208,6 +1208,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 ) ) { @@ -1215,9 +1221,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;