Fix #6065: remove underscores when using MAG_NAMESPACE & MAG_TALKSPACE
authorAntoine Musso <hashar@users.mediawiki.org>
Wed, 24 May 2006 19:55:48 +0000 (19:55 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Wed, 24 May 2006 19:55:48 +0000 (19:55 +0000)
use MAG_NAMESPACEE & MAG_TALKSPACEE if you want URL encoded text.

RELEASE-NOTES
includes/Parser.php

index 25049f1..2c526e6 100644 (file)
@@ -326,6 +326,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 6054) Update to Indonesian localisation (id) #16
 * Add {{CURRENTTIMESTAMP}} magic word
 * (bug 6061) Improper escaping in some html forms
+* (bug 6065) Remove underscore when using NAMESPACE and TALKSPACE magics.
 
 == Compatibility ==
 
index bd54cfc..549ba30 100644 (file)
@@ -2135,11 +2135,11 @@ class Parser
                        case MAG_REVISIONID:
                                return $this->mRevisionId;
                        case MAG_NAMESPACE:
-                               return $wgContLang->getNsText( $this->mTitle->getNamespace() );
+                               return str_replace('_',' ',$wgContLang->getNsText( $this->mTitle->getNamespace() ) );
                        case MAG_NAMESPACEE:
                                return wfUrlencode( $wgContLang->getNsText( $this->mTitle->getNamespace() ) );
                        case MAG_TALKSPACE:
-                               return $this->mTitle->canTalk() ? $this->mTitle->getTalkNsText() : '';
+                               return $this->mTitle->canTalk() ? str_replace('_',' ',$this->mTitle->getTalkNsText()) : '';
                        case MAG_TALKSPACEE:
                                return $this->mTitle->canTalk() ? wfUrlencode( $this->mTitle->getTalkNsText() ) : '';
                        case MAG_SUBJECTSPACE: