* (bug 5021) Transcluding the same special page twice now works
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 4 Jun 2006 02:41:52 +0000 (02:41 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 4 Jun 2006 02:41:52 +0000 (02:41 +0000)
RELEASE-NOTES
includes/Parser.php
maintenance/parserTests.txt

index 066fb10..73b3fce 100644 (file)
@@ -424,6 +424,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   per-namespace basis.
 * Add <ol> to the list of block elements for doBlockLevels; avoids <p>s being
   interspersed into your ordered lists.
+* (bug 5021) Transcluding the same special page twice now works
 
 
 == Compatibility ==
index e4b9d23..4afa23e 100644 (file)
@@ -2918,7 +2918,11 @@ class Parser
                                # Use the original $piece['title'] not the mangled $part1, so that
                                # modifiers such as RAW: produce separate cache entries
                                if( $found ) {
-                                       $this->mTemplates[$piece['title']] = $text;
+                                       if( $isHTML ) {
+                                               // A special page; don't store it in the template cache.
+                                       } else {
+                                               $this->mTemplates[$piece['title']] = $text;
+                                       }
                                        $text = $linestart . $text;
                                }
                        }
index b39d6d3..2de4bdc 100644 (file)
@@ -4389,6 +4389,41 @@ Mixing markup for italics and bold
 </p>
 !! end
 
+
+!! article
+Xyzzyx
+!! text
+Article for special page transclusion test
+!! endarticle
+
+!! test
+Special page transclusion
+!! options
+!! input
+{{Special:Prefixindex/Xyzzyx}}
+!! result
+<p><br />
+</p>
+<table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
+
+!! end
+
+!! test
+Special page transclusion twice (bug 5021)
+!! options
+!! input
+{{Special:Prefixindex/Xyzzyx}}
+{{Special:Prefixindex/Xyzzyx}}
+!! result
+<p><br />
+</p>
+<table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
+<p><br />
+</p>
+<table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
+
+!! end
+
 #
 #
 #