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)
1  2 
maintenance/Maintenance.php

@@@ -1203,10 -1166,13 +1203,13 @@@ abstract class Maintenance 
                }
  
                if ( !is_readable( $settingsFile ) ) {
 -                      $this->error( "A copy of your installation's LocalSettings.php\n" .
 +                      $this->fatalError( "A copy of your installation's LocalSettings.php\n" .
                                "must exist and be readable in the source directory.\n" .
 -                              "Use --conf to specify it.", true );
 +                              "Use --conf to specify it." );
                }
+               if ( isset( $this->mOptions['server'] ) ) {
+                       $_SERVER['SERVER_NAME'] = $this->mOptions['server'];
+               }
                $wgCommandLineMode = true;
  
                return $settingsFile;