From: Platonides Date: Tue, 10 Aug 2010 14:11:51 +0000 (+0000) Subject: Follow up r70783. Define variable used in debug message. X-Git-Tag: 1.31.0-rc.0~35564 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22brouteur%22%2C%28%24id_rubrique%20?a=commitdiff_plain;h=b1aee940faf5b9bd8a21a5066ffc8cdbb5a43dec;p=lhc%2Fweb%2Fwiklou.git Follow up r70783. Define variable used in debug message. Provide the fallback prototype again, seems still used by extensions. --- diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php index ce820fe54d..61cb9ecbbe 100644 --- a/includes/parser/ParserCache.php +++ b/includes/parser/ParserCache.php @@ -78,6 +78,11 @@ class ParserCache { public function getKey( $article, $popts, $useOutdated = true ) { global $wgCacheEpoch; + if( $popts instanceof User ) { + wfDebug( "Use of outdated prototype ParserCache::getKey( &\$article, &\$user )\n" ); + $popts = ParserOptions::newFromUser( $popts ); + } + // Determine the options which affect this article $optionsKey = $this->mMemc->get( $this->getOptionsKey( $article ) ); if ( $optionsKey != false ) { @@ -135,6 +140,7 @@ class ParserCache { if ( !$useOutdated && $value->expired( $touched ) ) { wfIncrStats( "pcache_miss_expired" ); + $cacheTime = $value->getCacheTime(); wfDebug( "ParserOutput key expired, touched $touched, epoch $wgCacheEpoch, cached $cacheTime\n" ); $value = false; } else {