From: Antoine Musso Date: Wed, 24 May 2006 19:55:48 +0000 (+0000) Subject: Fix #6065: remove underscores when using MAG_NAMESPACE & MAG_TALKSPACE X-Git-Tag: 1.31.0-rc.0~57046 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=d1a9b7c02a1ca1701a80c2f38d1113acabeefa89;p=lhc%2Fweb%2Fwiklou.git Fix #6065: remove underscores when using MAG_NAMESPACE & MAG_TALKSPACE use MAG_NAMESPACEE & MAG_TALKSPACEE if you want URL encoded text. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 25049f1cef..2c526e6521 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/Parser.php b/includes/Parser.php index bd54cfc4da..549ba30461 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -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: