r81750 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81749‎ | r81750 | r81751 >
Date:15:25, 8 February 2011
Author:platonides
Status:ok
Tags:
Comment:
Merge r81746 & r81749
Modified paths:
  • /trunk/extensions/MultilingualLiquidThreads/LiquidThreads/classes/View.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MultilingualLiquidThreads/LiquidThreads/classes/View.php
@@ -2133,7 +2133,7 @@
21342134 }
21352135
21362136 static function parseSignature( $sig ) {
2137 - global $wgParser, $wgOut, $wgTitle;
 2137+ global $wgOut;
21382138
21392139 static $parseCache = array();
21402140 $sigKey = md5( $sig );
@@ -2142,11 +2142,6 @@
21432143 return $parseCache[$sigKey];
21442144 }
21452145
2146 - // Parser gets antsy about parser options here if it hasn't parsed anything before.
2147 - $wgParser->clearState();
2148 - $wgParser->setTitle( $wgTitle );
2149 - $wgParser->mOptions = new ParserOptions;
2150 -
21512146 $sig = $wgOut->parseInline( $sig );
21522147
21532148 $parseCache[$sigKey] = $sig;
@@ -2159,17 +2154,12 @@
21602155
21612156 $title = $wgTitle ? $wgTitle : $user->getUserPage()->getTitle();
21622157
2163 - // Parser gets antsy about parser options here if it hasn't parsed anything before.
2164 - $wgParser->clearState();
2165 - $wgParser->setTitle( $title );
2166 - $wgParser->mOptions = new ParserOptions;
2167 -
21682158 $sig = $wgParser->preSaveTransform(
21692159 $sig,
21702160 $title,
21712161 $user,
2172 - $wgParser->mOptions,
2173 - false
 2162+ new ParserOptions,
 2163+ true
21742164 );
21752165
21762166 return $sig;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81746$wgOut->parseInline calls $wgOut->parse which already does a clearState(), se...platonides15:18, 8 February 2011
r81749No need to break the API calling the private clearState() when there's a clea...platonides15:21, 8 February 2011

Status & tagging log