Pass WikiPage objects to ParserCache
authorumherirrender <umherirrender_de.wp@web.de>
Tue, 2 Feb 2016 19:38:36 +0000 (20:38 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Tue, 2 Feb 2016 19:38:36 +0000 (20:38 +0100)
ParserCache::get is documented for WikiPage, so do it from Article class
This avoids magic calls due Article::__call

Change-Id: I92b91bd112383d1c0132530c3325b39596d95768

includes/page/Article.php

index f16158b..f67ebcc 100644 (file)
@@ -521,7 +521,7 @@ class Article implements Page {
                # Try client and file cache
                if ( !$wgDebugToolbar && $oldid === 0 && $this->mPage->checkTouched() ) {
                        if ( $wgUseETag ) {
-                               $outputPage->setETag( $parserCache->getETag( $this, $parserOptions ) );
+                               $outputPage->setETag( $parserCache->getETag( $this->mPage, $parserOptions ) );
                        }
 
                        # Use the greatest of the page's timestamp or the timestamp of any
@@ -595,7 +595,7 @@ class Article implements Page {
 
                                        # Try the parser cache
                                        if ( $useParserCache ) {
-                                               $this->mParserOutput = $parserCache->get( $this, $parserOptions );
+                                               $this->mParserOutput = $parserCache->get( $this->mPage, $parserOptions );
 
                                                if ( $this->mParserOutput !== false ) {
                                                        if ( $oldid ) {