Index: branches/REL1_16/phase3/maintenance/generateSitemap.php |
— | — | @@ -131,9 +131,6 @@ |
132 | 132 | $this->mDescription = "Creates a sitemap for the site"; |
133 | 133 | $this->addOption( 'fspath', 'The file system path to save to, e.g. /tmp/sitemap' . |
134 | 134 | "\n\t\tdefaults to current directory", false, true ); |
135 | | - $this->addOption( 'server', "The protocol and server name to use in URLs, e.g.\n" . |
136 | | - "\t\thttp://en.wikipedia.org. This is sometimes necessary because\n" . |
137 | | - "\t\tserver name detection may fail in command line scripts.", false, true ); |
138 | 135 | $this->addOption( 'compress', 'Compress the sitemap files, can take value yes|no, default yes', false, true ); |
139 | 136 | } |
140 | 137 | |
Index: branches/REL1_16/phase3/maintenance/Maintenance.php |
— | — | @@ -312,6 +312,9 @@ |
313 | 313 | $this->addOption( 'conf', "Location of LocalSettings.php, if not default", false, true ); |
314 | 314 | $this->addOption( 'wiki', "For specifying the wiki ID", false, true ); |
315 | 315 | $this->addOption( 'globals', "Output globals at the end of processing for debugging" ); |
| 316 | + $this->addOption( 'server', "The protocol and server name to use in URLs, e.g.\n" . |
| 317 | + "\t\thttp://en.wikipedia.org. This is sometimes necessary because\n" . |
| 318 | + "\t\tserver name detection may fail in command line scripts.", false, true ); |
316 | 319 | // If we support a DB, show the options |
317 | 320 | if( $this->getDbType() > 0 ) { |
318 | 321 | $this->addOption( 'dbuser', "The DB user to use for this script", false, true ); |
— | — | @@ -612,7 +615,7 @@ |
613 | 616 | * Handle some last-minute setup here. |
614 | 617 | */ |
615 | 618 | public function finalSetup() { |
616 | | - global $wgCommandLineMode, $wgShowSQLErrors; |
| 619 | + global $wgCommandLineMode, $wgShowSQLErrors, $wgServer; |
617 | 620 | global $wgTitle, $wgProfiling, $IP, $wgDBadminuser, $wgDBadminpassword; |
618 | 621 | global $wgDBuser, $wgDBpassword, $wgDBservers, $wgLBFactoryConf; |
619 | 622 | |
— | — | @@ -623,6 +626,11 @@ |
624 | 627 | # Same with these |
625 | 628 | $wgCommandLineMode = true; |
626 | 629 | |
| 630 | + # Override $wgServer |
| 631 | + if( $this->hasOption( 'server') ) { |
| 632 | + $wgServer = $this->getOption( 'server', $wgServer ); |
| 633 | + } |
| 634 | + |
627 | 635 | # If these were passed, use them |
628 | 636 | if( $this->mDbUser ) |
629 | 637 | $wgDBadminuser = $this->mDbUser; |
Property changes on: branches/REL1_16/phase3/maintenance/Maintenance.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
630 | 638 | Merged /trunk/phase3/maintenance/Maintenance.php:r75650 |
Property changes on: branches/REL1_16/phase3/maintenance |
___________________________________________________________________ |
Added: svn:mergeinfo |
631 | 639 | Merged /trunk/phase3/maintenance:r63545-63546,63549,63643,63764,63897-63901,64876,75650 |