From 3289652bc14ec0b57e637f06c4765d508e3f4147 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 19 Dec 2008 08:16:05 +0000 Subject: [PATCH] short-circuit update call --- includes/Wiki.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/Wiki.php b/includes/Wiki.php index 8484954529..649b07b6c2 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -226,16 +226,18 @@ class MediaWiki { if( $title->getNamespace() != NS_MEDIAWIKI && HTMLFileCache::useFileCache() ) { $cache = new HTMLFileCache( $title ); if( $cache->isFileCacheGood( /* Assume up to date */ ) ) { - global $wgOut; + global $wgOut, $wgDisableCounters; /* Check incoming headers to see if client has this cached */ if( !$wgOut->checkLastModified( $cache->fileCacheTime() ) ) { wfDebug( "MediaWiki::initializeSpecialCases(): about to load file cache\n" ); $cache->loadFromFileCache(); # Tell $wgOut that output is taken care of $wgOut->disable(); - # Do any stats increment/watchlist stuff - $article = self::articleFromTitle( $title ); - $article->viewUpdates(); + if( !$wgDisableCounters ) { + # Do any stats increment/watchlist stuff + $article = self::articleFromTitle( $title ); + $article->viewUpdates(); + } } wfProfileOut( __METHOD__ ); return true; -- 2.20.1