Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -226,16 +226,18 @@ |
227 | 227 | if( $title->getNamespace() != NS_MEDIAWIKI && HTMLFileCache::useFileCache() ) { |
228 | 228 | $cache = new HTMLFileCache( $title ); |
229 | 229 | if( $cache->isFileCacheGood( /* Assume up to date */ ) ) { |
230 | | - global $wgOut; |
| 230 | + global $wgOut, $wgDisableCounters; |
231 | 231 | /* Check incoming headers to see if client has this cached */ |
232 | 232 | if( !$wgOut->checkLastModified( $cache->fileCacheTime() ) ) { |
233 | 233 | wfDebug( "MediaWiki::initializeSpecialCases(): about to load file cache\n" ); |
234 | 234 | $cache->loadFromFileCache(); |
235 | 235 | # Tell $wgOut that output is taken care of |
236 | 236 | $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 | + } |
240 | 242 | } |
241 | 243 | wfProfileOut( __METHOD__ ); |
242 | 244 | return true; |