From: Brion Vibber Date: Sun, 4 Jun 2006 02:41:52 +0000 (+0000) Subject: * (bug 5021) Transcluding the same special page twice now works X-Git-Tag: 1.31.0-rc.0~56903 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=3cbc209ac2c20115a5a06065cf68e8b357f68310;p=lhc%2Fweb%2Fwiklou.git * (bug 5021) Transcluding the same special page twice now works --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 066fb107a4..73b3fce494 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -424,6 +424,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN per-namespace basis. * Add
    to the list of block elements for doBlockLevels; avoids

    s being interspersed into your ordered lists. +* (bug 5021) Transcluding the same special page twice now works == Compatibility == diff --git a/includes/Parser.php b/includes/Parser.php index e4b9d23325..4afa23e68d 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -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; } } diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index b39d6d381c..2de4bdc81c 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -4389,6 +4389,41 @@ Mixing markup for italics and bold

    !! end + +!! article +Xyzzyx +!! text +Article for special page transclusion test +!! endarticle + +!! test +Special page transclusion +!! options +!! input +{{Special:Prefixindex/Xyzzyx}} +!! result +


    +

    +
    Xyzzyx
    + +!! end + +!! test +Special page transclusion twice (bug 5021) +!! options +!! input +{{Special:Prefixindex/Xyzzyx}} +{{Special:Prefixindex/Xyzzyx}} +!! result +


    +

    +
    Xyzzyx
    +


    +

    +
    Xyzzyx
    + +!! end + # # #