summaryrefslogtreecommitdiff
path: root/maintenance
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-01-04 12:24:29 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-01-04 12:24:29 +0100
commit8f93926e1bc6e96fc11b4d0d201025022d471de7 (patch)
tree7e13841de0a7d33faf5481d44ca7471ce639193a /maintenance
parentfe786bf329367b2d2663ea7f2474ceaeeace6180 (diff)
update to MediaWiki 1.16.1
Diffstat (limited to 'maintenance')
-rw-r--r--maintenance/Maintenance.php10
-rw-r--r--maintenance/generateSitemap.php3
-rw-r--r--maintenance/parserTests.txt14
3 files changed, 23 insertions, 4 deletions
diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php
index 277278c0..ee35df7c 100644
--- a/maintenance/Maintenance.php
+++ b/maintenance/Maintenance.php
@@ -312,6 +312,9 @@ abstract class Maintenance {
$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 @@ abstract class Maintenance {
* 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 @@ abstract class Maintenance {
# 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;
diff --git a/maintenance/generateSitemap.php b/maintenance/generateSitemap.php
index 8ca79341..04dbbc4d 100644
--- a/maintenance/generateSitemap.php
+++ b/maintenance/generateSitemap.php
@@ -131,9 +131,6 @@ class GenerateSitemap extends Maintenance {
$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 );
}
diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt
index 500341d1..4515943a 100644
--- a/maintenance/parserTests.txt
+++ b/maintenance/parserTests.txt
@@ -7018,6 +7018,20 @@ China
!! end
!! test
+Bug 24072: more test on conversion rule for title
+!! options
+language=zh variant=zh-tw showtitle
+!! input
+This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
+This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
+!! result
+Taiwan
+<p>This should be stripped!
+This won't take interferes with the title rule.
+</p>
+!! end
+
+!! test
Raw output of variant escape tags (R flag)
!! options
language=zh variant=zh-tw