X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fparser%2FParser.php;h=0721446ba7be6d1195aaf409411465442c19f797;hp=a2c5eec8f499bea0f2c6fb4c2a1c9e6ea5f8d657;hb=3e74b6eeaaf4ad0ce1217d013cca09a3f07cb5c7;hpb=7edc68631cd9abdf7bb3cedfcfb7764831b1f1e6 diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index a2c5eec8f4..0721446ba7 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3693,6 +3693,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. @@ -3727,8 +3739,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" ); }