Revert r44798 "short-circuit update call"
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 23 Dec 2008 19:31:08 +0000 (19:31 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 23 Dec 2008 19:31:08 +0000 (19:31 +0000)
Article::viewUpdates() may do things other than update counters (for instance, it updates the user-talk and watchlist for last-viewed status, and might do other things in the future). Let it centralize its own checks for what things are enabled. Since you won't necessarily know them all over in Wiki.png, they may get out of sync and lead to bugs if you try to replicate the check.

includes/Wiki.php

index 4dcad9a..6e96fba 100644 (file)
@@ -222,18 +222,16 @@ class MediaWiki {
                        if( $title->getNamespace() != NS_MEDIAWIKI && HTMLFileCache::useFileCache() ) {
                                $cache = new HTMLFileCache( $title );
                                if( $cache->isFileCacheGood( /* Assume up to date */ ) ) {
-                                       global $wgOut, $wgDisableCounters;
+                                       global $wgOut;
                                        /* 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();
-                                               if( !$wgDisableCounters ) {
-                                                       # Do any stats increment/watchlist stuff
-                                                       $article = self::articleFromTitle( $title );
-                                                       $article->viewUpdates();
-                                               }
+                                               # Do any stats increment/watchlist stuff
+                                               $article = self::articleFromTitle( $title );
+                                               $article->viewUpdates();
                                        }
                                        wfProfileOut( __METHOD__ );
                                        $this->restInPeace();