r32963 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32962‎ | r32963 | r32964 >
Date:15:55, 8 April 2008
Author:sanbeg
Status:old
Tags:
Comment:
apply lsth patch from bug 12906, update lst parser test for redlink=1 feature
Modified paths:
  • /trunk/extensions/LabeledSectionTransclusion/lstParserTests.txt (modified) (history)
  • /trunk/extensions/LabeledSectionTransclusion/lsth.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LabeledSectionTransclusion/lstParserTests.txt
@@ -229,7 +229,7 @@
230230 !!input
231231 {{#lst:no such article|anything}}
232232 !!result
233 -<p><a href="https://www.mediawiki.org/index.php?title=No_such_article&amp;action=edit" class="new" title="No such article">No such article</a>
 233+<p><a href="https://www.mediawiki.org/index.php?title=No_such_article&amp;action=edit&amp;redlink=1" class="new" title="No such article (not yet written)">No such article</a>
234234 </p>
235235 !!end
236236
Index: trunk/extensions/LabeledSectionTransclusion/lsth.php
@@ -93,6 +93,15 @@
9494 else
9595 $result = substr($text, $begin_off);
9696
 97+
 98+ if (method_exists($parser->getPreprocessor))
 99+ {
 100+ $frame = $parser->getPreprocessor()->newFrame();
 101+ $dom = $parser->preprocessToDom( $result );
 102+ $result = $frame->expand( $dom );
 103+ }
 104+
 105+
97106 return LabeledSectionTransclusion::parse_($parser,$title,$result, "#lsth:${page}|${sec}", $nhead);
98107 }
99108

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r31799Updated to work around bug 12906mkroetzsch16:48, 11 March 2008
r31800Workaround for bug 12906 as suggested in the bug report.mkroetzsch16:55, 11 March 2008

Status & tagging log