Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -188,6 +188,7 @@ |
189 | 189 | * (bug 23194) Special:ListFiles now has thumbnails |
190 | 190 | * Use hreflang to specify canonical and alternate links, search engine friendly |
191 | 191 | when a wiki has multiple variant languages. |
| 192 | +* (bug 19593) Specifying --server in now works for all maintenance scripts |
192 | 193 | |
193 | 194 | === Bug fixes in 1.17 === |
194 | 195 | * (bug 17560) Half-broken deletion moved image files to deletion archive |
Index: trunk/phase3/maintenance/Maintenance.php |
— | — | @@ -351,6 +351,9 @@ |
352 | 352 | $this->addOption( 'wiki', 'For specifying the wiki ID', false, true ); |
353 | 353 | $this->addOption( 'globals', 'Output globals at the end of processing for debugging' ); |
354 | 354 | $this->addOption( 'memory-limit', 'Set a specific memory limit for the script, "max" for no limit or "default" to avoid changing it' ); |
| 355 | + $this->addOption( 'server', "The protocol and server name to use in URLs, e.g.\n" . |
| 356 | + "\t\thttp://en.wikipedia.org. This is sometimes necessary because\n" . |
| 357 | + "\t\tserver name detection may fail in command line scripts.", false, true ); |
355 | 358 | // If we support a DB, show the options |
356 | 359 | if ( $this->getDbType() > 0 ) { |
357 | 360 | $this->addOption( 'dbuser', 'The DB user to use for this script', false, true ); |
— | — | @@ -693,7 +696,7 @@ |
694 | 697 | * Handle some last-minute setup here. |
695 | 698 | */ |
696 | 699 | public function finalSetup() { |
697 | | - global $wgCommandLineMode, $wgShowSQLErrors; |
| 700 | + global $wgCommandLineMode, $wgShowSQLErrors, $wgServer; |
698 | 701 | global $wgProfiling, $wgDBadminuser, $wgDBadminpassword; |
699 | 702 | global $wgDBuser, $wgDBpassword, $wgDBservers, $wgLBFactoryConf; |
700 | 703 | |
— | — | @@ -704,6 +707,11 @@ |
705 | 708 | # Same with these |
706 | 709 | $wgCommandLineMode = true; |
707 | 710 | |
| 711 | + # Override $wgServer |
| 712 | + if( $this->hasOption( 'server') ) { |
| 713 | + $wgServer = $this->getOption( 'server', $wgServer ); |
| 714 | + } |
| 715 | + |
708 | 716 | # If these were passed, use them |
709 | 717 | if ( $this->mDbUser ) { |
710 | 718 | $wgDBadminuser = $this->mDbUser; |
Index: trunk/phase3/maintenance/generateSitemap.php |
— | — | @@ -128,9 +128,6 @@ |
129 | 129 | $this->mDescription = "Creates a sitemap for the site"; |
130 | 130 | $this->addOption( 'fspath', 'The file system path to save to, e.g. /tmp/sitemap' . |
131 | 131 | "\n\t\tdefaults to current directory", false, true ); |
132 | | - $this->addOption( 'server', "The protocol and server name to use in URLs, e.g.\n" . |
133 | | - "\t\thttp://en.wikipedia.org. This is sometimes necessary because\n" . |
134 | | - "\t\tserver name detection may fail in command line scripts.", false, true ); |
135 | 132 | $this->addOption( 'compress', 'Compress the sitemap files, can take value yes|no, default yes', false, true ); |
136 | 133 | } |
137 | 134 | |