http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75651
Revision: 75651 Author: demon Date: 2010-10-29 16:41:21 +0000 (Fri, 29 Oct 2010) Log Message: ----------- MFT r75650 Modified Paths: -------------- branches/REL1_16/phase3/maintenance/Maintenance.php branches/REL1_16/phase3/maintenance/generateSitemap.php Property Changed: ---------------- branches/REL1_16/phase3/maintenance/ branches/REL1_16/phase3/maintenance/Maintenance.php Property changes on: branches/REL1_16/phase3/maintenance ___________________________________________________________________ Added: svn:mergeinfo + /trunk/phase3/maintenance:63545-63546,63549,63643,63764,63897-63901,64876,75650 Modified: branches/REL1_16/phase3/maintenance/Maintenance.php =================================================================== --- branches/REL1_16/phase3/maintenance/Maintenance.php 2010-10-29 16:28:50 UTC (rev 75650) +++ branches/REL1_16/phase3/maintenance/Maintenance.php 2010-10-29 16:41:21 UTC (rev 75651) @@ -312,6 +312,9 @@ $this->addOption( 'conf', "Location of LocalSettings.php, if not default", false, true ); $this->addOption( 'wiki', "For specifying the wiki ID", false, true ); $this->addOption( 'globals', "Output globals at the end of processing for debugging" ); + $this->addOption( 'server', "The protocol and server name to use in URLs, e.g.\n" . + "\t\thttp://en.wikipedia.org. This is sometimes necessary because\n" . + "\t\tserver name detection may fail in command line scripts.", false, true ); // If we support a DB, show the options if( $this->getDbType() > 0 ) { $this->addOption( 'dbuser', "The DB user to use for this script", false, true ); @@ -612,7 +615,7 @@ * Handle some last-minute setup here. */ public function finalSetup() { - global $wgCommandLineMode, $wgShowSQLErrors; + global $wgCommandLineMode, $wgShowSQLErrors, $wgServer; global $wgTitle, $wgProfiling, $IP, $wgDBadminuser, $wgDBadminpassword; global $wgDBuser, $wgDBpassword, $wgDBservers, $wgLBFactoryConf; @@ -623,6 +626,11 @@ # Same with these $wgCommandLineMode = true; + # Override $wgServer + if( $this->hasOption( 'server') ) { + $wgServer = $this->getOption( 'server', $wgServer ); + } + # If these were passed, use them if( $this->mDbUser ) $wgDBadminuser = $this->mDbUser; Property changes on: branches/REL1_16/phase3/maintenance/Maintenance.php ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/phase3/maintenance/Maintenance.php:63545-63546,63549,63643,63764,63897-63901,64876,67320 + /trunk/phase3/maintenance/Maintenance.php:63545-63546,63549,63643,63764,63897-63901,64876,67320,75650 Modified: branches/REL1_16/phase3/maintenance/generateSitemap.php =================================================================== --- branches/REL1_16/phase3/maintenance/generateSitemap.php 2010-10-29 16:28:50 UTC (rev 75650) +++ branches/REL1_16/phase3/maintenance/generateSitemap.php 2010-10-29 16:41:21 UTC (rev 75651) @@ -131,9 +131,6 @@ $this->mDescription = "Creates a sitemap for the site"; $this->addOption( 'fspath', 'The file system path to save to, e.g. /tmp/sitemap' . "\n\t\tdefaults to current directory", false, true ); - $this->addOption( 'server', "The protocol and server name to use in URLs, e.g.\n" . - "\t\thttp://en.wikipedia.org. This is sometimes necessary because\n" . - "\t\tserver name detection may fail in command line scripts.", false, true ); $this->addOption( 'compress', 'Compress the sitemap files, can take value yes|no, default yes', false, true ); } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs