X-Git-Url: http://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=includes%2Fparser%2FParser.php;h=f0de1c99948ca1469159800a6c6c14cd4f1d3d02;hb=dd6ed7840f21cb31c0816a26cb2836a9de42d2b3;hp=4808cafe90bd95f23754e90d806b21aa0b7e7086;hpb=3ff807dd9a8e1e787b1290f610a5dff5739cd53c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 4808cafe90..f0de1c9994 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3691,6 +3691,18 @@ class Parser { return $this->currentRevisionCache->get( $cacheKey ); } + /** + * @param Title $title + * @return bool + * @since 1.34 + */ + public function isCurrentRevisionOfTitleCached( $title ) { + return ( + $this->currentRevisionCache && + $this->currentRevisionCache->has( $title->getPrefixedText() ) + ); + } + /** * Wrapper around Revision::newFromTitle to allow passing additional parameters * without passing them on to it. @@ -3725,8 +3737,7 @@ class Parser { foreach ( $stuff['deps'] as $dep ) { $this->mOutput->addTemplate( $dep['title'], $dep['page_id'], $dep['rev_id'] ); if ( $dep['title']->equals( $this->getTitle() ) ) { - // If we transclude ourselves, the final result - // will change based on the new version of the page + // Self-transclusion; final result may change based on the new page version $this->mOutput->setFlag( 'vary-revision' ); wfDebug( __METHOD__ . ": self transclusion, setting vary-revision" ); }