Do not access to mTouched internals of Article from a different module per r70783...
authorPlatonides <platonides@users.mediawiki.org>
Tue, 14 Dec 2010 17:49:01 +0000 (17:49 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Tue, 14 Dec 2010 17:49:01 +0000 (17:49 +0000)
includes/Article.php
includes/parser/ParserCache.php

index 758c451..35ab2eb 100644 (file)
@@ -1002,7 +1002,6 @@ class Article {
                                        # Run the parse, protected by a pool counter
                                        wfDebug( __METHOD__ . ": doing uncached parse\n" );
 
-                                       $this->checkTouched();
                                        $key = $parserCache->getKey( $this, $parserOptions );
                                        $poolArticleView = new PoolWorkArticleView( $this, $key, $useParserCache, $parserOptions );
 
index ea0292b..2318568 100644 (file)
@@ -66,7 +66,7 @@ class ParserCache {
        function getETag( $article, $popts ) {
                return 'W/"' . $this->getParserOutputKey( $article,
                        $popts->optionsHash( ParserOptions::legacyOptions() ) ) .
-                               "--" . $article->mTouched . '"';
+                               "--" . $article->getTouched() . '"';
        }
 
        /**
@@ -95,10 +95,10 @@ class ParserCache {
                // Determine the options which affect this article
                $optionsKey = $this->mMemc->get( $this->getOptionsKey( $article ) );
                if ( $optionsKey != false ) {
-                       if ( !$useOutdated && $optionsKey->expired( $article->mTouched ) ) {
+                       if ( !$useOutdated && $optionsKey->expired( $article->getTouched() ) ) {
                                wfIncrStats( "pcache_miss_expired" );
                                $cacheTime = $optionsKey->getCacheTime();
-                               wfDebug( "Parser options key expired, touched {$article->mTouched}, epoch $wgCacheEpoch, cached $cacheTime\n" );
+                               wfDebug( "Parser options key expired, touched " . $article->getTouched() . ", epoch $wgCacheEpoch, cached $cacheTime\n" );
                                return false;
                        }
 
@@ -128,8 +128,7 @@ class ParserCache {
                        return false;
                }
 
-               // Having called checkTouched() ensures this will be loaded
-               $touched = $article->mTouched;
+               $touched = $article->getTouched();
 
                $parserOutputKey = $this->getKey( $article, $popts, $useOutdated );
                if ( $parserOutputKey === false ) {