From: Steve Sanbeg Date: Thu, 29 Mar 2007 19:31:25 +0000 (+0000) Subject: fix section/size links from cached templates, so templates look teh same whether... X-Git-Tag: 1.31.0-rc.0~53534 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=412e981d1f8db53069b95e678365542e1e8188f0;p=lhc%2Fweb%2Fwiklou.git fix section/size links from cached templates, so templates look teh same whether from db or cache. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 37bcb583c7..afb7f7d860 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -291,6 +291,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 5817) Special:Recentchangeslinked now shows red link for nonexistent target page instead of silently redirecting * (bug 8914) Don't transform colons in {{anchorencode:}} +* (bug 9241) Handle edit section links and include size links for cached + templates the same as the first transclusion. == Maintenance == * New script maintenance/language/checkExtensioni18n.php used to check i18n diff --git a/includes/Parser.php b/includes/Parser.php index f5fbaa2a81..b9becd5bdd 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3032,6 +3032,19 @@ class Parser } else { # set $text to cached message. $text = $linestart . $this->mTemplates[$piece['title']]; + #treat title for cached page the same as others + $ns = NS_TEMPLATE; + $subpage = ''; + $part1 = $this->maybeDoSubpageLink( $part1, $subpage ); + if ($subpage !== '') { + $ns = $this->mTitle->getNamespace(); + } + $title = Title::newFromText( $part1, $ns ); + //used by include size checking + $titleText = $title->getPrefixedText(); + //used by edit section links + $replaceHeadings = true; + } }