r81929 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81928‎ | r81929 | r81930 >
Date:03:15, 11 February 2011
Author:juliano
Status:deferred
Tags:
Comment:
Avoid feature only present in PHP 5.3.
Modified paths:
  • /trunk/extensions/Wikilog/WikilogUtils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikilog/WikilogUtils.php
@@ -76,7 +76,7 @@
7777 $useParserCache = $wgEnableParserCache &&
7878 intval( $wgUser->getOption( 'stubthreshold' ) ) == 0 &&
7979 $article->exists();
80 - $parserCacheClass = "ParserCache";
 80+ $parserCache = ParserCache::singleton();
8181
8282 # Parser options.
8383 $parserOpt = ParserOptions::newFromUser( $wgUser );
@@ -89,16 +89,13 @@
9090 if ( method_exists( $parserOpt, 'addExtraKey' ) ) {
9191 $parserOpt->addExtraKey( "WikilogFeed" );
9292 } else {
93 - $parserCacheClass = "WikilogParserCache";
 93+ $parserCache = WikilogParserCache::singleton();
9494 }
9595 } else {
9696 $parserOpt->enableLimitReport();
9797 }
9898
9999 if ( $useParserCache ) {
100 - # Get the parser cache instance.
101 - $parserCache = $parserCacheClass::singleton();
102 -
103100 # Look for the parsed article output in the parser cache.
104101 $parserOutput = $parserCache->get( $article, $parserOpt );
105102

Status & tagging log