mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-24 00:05:00 +00:00
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:
parent
5575bd5822
commit
01c9ef5004
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue