Set vary-revision appropriately with getContent()

When calling getContent() on the page currently being viewed, set
vary-revision on the parser output, as is done when a page transcludes
itself.

Change-Id: I908f095935067dc24dd561192b0699c602cb605f
This commit is contained in:
Jackmcbarn 2014-09-05 17:04:46 -04:00
parent 5575bd5822
commit 01c9ef5004

View file

@ -223,6 +223,9 @@ class Scribunto_LuaTitleLibrary extends Scribunto_LuaLibraryBase {
$this->getParser()->getOutput()->addTemplate(
$title, $title->getArticleID(), $title->getLatestRevID()
);
if ( $title->equals( $this->getTitle() ) ) {
$this->getParser()->getOutput()->setFlag( 'vary-revision' );
}
$rev = Revision::newFromTitle( $title );
if ( !$rev ) {