From: Aaron Schulz Date: Fri, 19 Dec 2008 08:16:05 +0000 (+0000) Subject: short-circuit update call X-Git-Tag: 1.31.0-rc.0~43883 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/modifier.php?a=commitdiff_plain;h=3289652bc14ec0b57e637f06c4765d508e3f4147;p=lhc%2Fweb%2Fwiklou.git short-circuit update call --- 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;