From: Platonides Date: Tue, 14 Dec 2010 17:49:01 +0000 (+0000) Subject: Do not access to mTouched internals of Article from a different module per r70783... X-Git-Tag: 1.31.0-rc.0~33299 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=f3aabaa1f7fa259d81849ff162043819981a951f;p=lhc%2Fweb%2Fwiklou.git Do not access to mTouched internals of Article from a different module per r70783#c12039 --- 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 ) {