From f3aabaa1f7fa259d81849ff162043819981a951f Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 14 Dec 2010 17:49:01 +0000 Subject: [PATCH] Do not access to mTouched internals of Article from a different module per r70783#c12039 --- includes/Article.php | 1 - includes/parser/ParserCache.php | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 758c451ced..35ab2eb56b 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 ); diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php index ea0292b851..231856838a 100644 --- a/includes/parser/ParserCache.php +++ b/includes/parser/ParserCache.php @@ -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 ) { -- 2.20.1