r81746 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81745‎ | r81746 | r81747 >
Date:15:18, 8 February 2011
Author:platonides
Status:ok
Tags:
Comment:
$wgOut->parseInline calls $wgOut->parse which already does a clearState(), sets its own Options and overwrites the $wgTitle
There's no need to configure it via globals.
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/View.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/View.php
@@ -2115,7 +2115,7 @@
21162116 }
21172117
21182118 static function parseSignature( $sig ) {
2119 - global $wgParser, $wgOut, $wgTitle;
 2119+ global $wgOut;
21202120
21212121 static $parseCache = array();
21222122 $sigKey = md5( $sig );
@@ -2124,11 +2124,6 @@
21252125 return $parseCache[$sigKey];
21262126 }
21272127
2128 - // Parser gets antsy about parser options here if it hasn't parsed anything before.
2129 - $wgParser->mOptions = new ParserOptions;
2130 - $wgParser->clearState();
2131 - $wgParser->setTitle( $wgTitle );
2132 -
21332128 $sig = $wgOut->parseInline( $sig );
21342129
21352130 $parseCache[$sigKey] = $sig;

Follow-up revisions

RevisionCommit summaryAuthorDate
r81750Merge r81746 & r81749platonides15:25, 8 February 2011

Status & tagging log