r44798 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44797‎ | r44798 | r44799 >
Date:08:16, 19 December 2008
Author:aaron
Status:reverted (Comments)
Tags:
Comment:
short-circuit update call
Modified paths:
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -226,16 +226,18 @@
227227 if( $title->getNamespace() != NS_MEDIAWIKI && HTMLFileCache::useFileCache() ) {
228228 $cache = new HTMLFileCache( $title );
229229 if( $cache->isFileCacheGood( /* Assume up to date */ ) ) {
230 - global $wgOut;
 230+ global $wgOut, $wgDisableCounters;
231231 /* Check incoming headers to see if client has this cached */
232232 if( !$wgOut->checkLastModified( $cache->fileCacheTime() ) ) {
233233 wfDebug( "MediaWiki::initializeSpecialCases(): about to load file cache\n" );
234234 $cache->loadFromFileCache();
235235 # Tell $wgOut that output is taken care of
236236 $wgOut->disable();
237 - # Do any stats increment/watchlist stuff
238 - $article = self::articleFromTitle( $title );
239 - $article->viewUpdates();
 237+ if( !$wgDisableCounters ) {
 238+ # Do any stats increment/watchlist stuff
 239+ $article = self::articleFromTitle( $title );
 240+ $article->viewUpdates();
 241+ }
240242 }
241243 wfProfileOut( __METHOD__ );
242244 return true;

Follow-up revisions

RevisionCommit summaryAuthorDate
r44961Revert r44798 "short-circuit update call"...brion19:31, 23 December 2008

Comments

#Comment by Brion VIBBER (talk | contribs)   19:31, 23 December 2008

Reverted in r44961 -- Article::viewUpdates() may do other things; avoid duplicating checks which may get out of sync.

Status & tagging log