Merge "Set $_SERVER['SERVER_NAME'] to the value set by --server"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 24 Jan 2018 15:24:57 +0000 (15:24 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 24 Jan 2018 15:24:57 +0000 (15:24 +0000)
maintenance/Maintenance.php

index 5adbee5..86336cf 100644 (file)
@@ -1207,6 +1207,9 @@ 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;