Follow up r70783. Define variable used in debug message.
authorPlatonides <platonides@users.mediawiki.org>
Tue, 10 Aug 2010 14:11:51 +0000 (14:11 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Tue, 10 Aug 2010 14:11:51 +0000 (14:11 +0000)
Provide the fallback prototype again, seems still used by extensions.

includes/parser/ParserCache.php

index ce820fe..61cb9ec 100644 (file)
@@ -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 {