Merge "Set $_SERVER['SERVER_NAME'] to the value set by --server"
[lhc/web/wiklou.git] / 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;