Fix for bug 4783 : {{ns:0}} does not render
authorMagnus Manske <magnusmanske@users.mediawiki.org>
Sat, 28 Jan 2006 21:44:57 +0000 (21:44 +0000)
committerMagnus Manske <magnusmanske@users.mediawiki.org>
Sat, 28 Jan 2006 21:44:57 +0000 (21:44 +0000)
RELEASE-NOTES
includes/Parser.php

index d1b3684..7df1839 100644 (file)
@@ -257,6 +257,7 @@ Parser:
 * Convert unnecessary URL escape codes in external links to their equivalent
   character before doing anything with them. This prevents certain kinds of
   spam filter evasion.
+* (bug 4783) : Fix for "{{ns:0}} does not render"
 
 Upload:
 * (bug 2527) Always set destination filename when new file is selected
index 3968034..580d63b 100644 (file)
@@ -2423,7 +2423,7 @@ class Parser
                        # Check for NS: (namespace expansion)
                        $mwNs = MagicWord::get( MAG_NS );
                        if ( $mwNs->matchStartAndRemove( $part1 ) ) {
-                               if ( intval( $part1 ) ) {
+                               if ( intval( $part1 ) || $part1 == "0" ) {
                                        $text = $linestart . $wgContLang->getNsText( intval( $part1 ) );
                                        $found = true;
                                } else {