From: Rob Church Date: Thu, 29 Jun 2006 00:36:01 +0000 (+0000) Subject: * (bug 6201) Treat spaces as underscores in parameters to {{ns:}} X-Git-Tag: 1.31.0-rc.0~56536 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=0106842e64cad17e259499fed7f77927f41cc5d2;p=lhc%2Fweb%2Fwiklou.git * (bug 6201) Treat spaces as underscores in parameters to {{ns:}} --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 33c048708e..f100a7fa92 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -598,6 +598,7 @@ Some default configuration options have changed: * (bug 6479) Allow specification of the skin to use during HTML dumps * (bug 6461) Link to page histories in Special:Newpages * (bug 6484) Don't do message transformations when preloading messages for editing +* (bug 6201) Treat spaces as underscores in parameters to {{ns:}} == Compatibility == diff --git a/includes/Parser.php b/includes/Parser.php index cf692c98c8..c6098d559d 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -2673,7 +2673,8 @@ class Parser $text = $linestart . $wgContLang->getNsText( intval( $part1 ) ); $found = true; } else { - $index = Namespace::getCanonicalIndex( strtolower( $part1 ) ); + $param = str_replace( ' ', '_', strtolower( $part1 ) ); + $index = Namespace::getCanonicalIndex( strtolower( $param ) ); if ( !is_null( $index ) ) { $text = $linestart . $wgContLang->getNsText( $index ); $found = true;