r71965 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71964‎ | r71965 | r71966 >
Date:17:36, 30 August 2010
Author:demon
Status:deferred
Tags:
Comment:
Avoid warning on using User object with parser cache
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -609,6 +609,9 @@
610610 * Like ParserCache::getKey() with stable-pcache instead of pcache
611611 */
612612 protected static function getCacheKey( $parserCache, Article $article, $popts ) {
 613+ if( $popts instanceof User ) {
 614+ $popts = ParserOptions::newFromUser( $popts );
 615+ }
613616 $key = $parserCache->getKey( $article, $popts );
614617 $key = str_replace( ':pcache:', ':stable-pcache:', $key );
615618 return $key;

Status & tagging log