r57746 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57745‎ | r57746 | r57747 >
Date:06:55, 15 October 2009
Author:aaron
Status:ok
Tags:
Comment:
made articleLinksUpdate try anon cache too
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -917,8 +917,11 @@
918918 global $wgUser, $wgParser;
919919 # Update the links tables as the stable version may now be the default page...
920920 $parserCache = ParserCache::singleton();
921 - $poutput = $parserCache->get( $article, $wgUser );
922 - if( $poutput==false ) {
 921+ $anon = new User(); // anon cache most likely to exist
 922+ $poutput = $parserCache->get( $article, $anon );
 923+ if( $poutput == false && $wgUser->getId() )
 924+ $poutput = $parserCache->get( $article, $wgUser );
 925+ if( $poutput == false ) {
923926 $text = $article->getContent();
924927 $options = self::makeParserOptions();
925928 $poutput = $wgParser->parse($text, $article->getTitle(), $options);

Status & tagging log