* (bug 6201) Treat spaces as underscores in parameters to {{ns:}}
authorRob Church <robchurch@users.mediawiki.org>
Thu, 29 Jun 2006 00:36:01 +0000 (00:36 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Thu, 29 Jun 2006 00:36:01 +0000 (00:36 +0000)
RELEASE-NOTES
includes/Parser.php

index 33c0487..f100a7f 100644 (file)
@@ -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 ==
 
index cf692c9..c6098d5 100644 (file)
@@ -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;