fix section/size links from cached templates, so templates look teh same whether...
authorSteve Sanbeg <sanbeg@users.mediawiki.org>
Thu, 29 Mar 2007 19:31:25 +0000 (19:31 +0000)
committerSteve Sanbeg <sanbeg@users.mediawiki.org>
Thu, 29 Mar 2007 19:31:25 +0000 (19:31 +0000)
RELEASE-NOTES
includes/Parser.php

index 37bcb58..afb7f7d 100644 (file)
@@ -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
index f5fbaa2..b9becd5 100644 (file)
@@ -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;
+                               
                        }
                }