r81752 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81751‎ | r81752 | r81753 >
Date:15:28, 8 February 2011
Author:platonides
Status:deferred
Tags:
Comment:
You're lucky: There was a function for doing precisely that.
Modified paths:
  • /trunk/extensions/News/NewsRenderer.php (modified) (history)

Diff [purge]

Index: trunk/extensions/News/NewsRenderer.php
@@ -831,12 +831,7 @@
832832 // this would still save the cost of rendering if the data didn't change
833833 global $wgParser; //evil global
834834
835 - if (!$wgParser->mOptions) { //XXX: ugly hack :(
836 - $wgParser->mOptions = new ParserOptions;
837 - $wgParser->setOutputType( OT_HTML );
838 - $wgParser->clearState();
839 - $wgParser->mTitle = $this->mTitle;
840 - }
 835+ $wgParser->startExternalParse( $this->mTitle, new ParserOptions, OT_HTML, true );
841836
842837 //FIXME: an EXTREMELY ugly hack to force generation of absolute links.
843838 // this is needed because Title::getLocalUrl check wgRequest to see

Status & tagging log