From 457431b57bd046813cc99385bafd317154a862ab Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 9 Jun 2016 21:46:54 -0700 Subject: [PATCH] Avoid setting vary-revision for {{REVISIONSIZE}} Just always use the input size for new revisions. If they are saved, then that should be the revision size. If they are just null edits, then the size must have matched the current revision. This also enables edit stashing for this case. Change-Id: I428c0cc87750eeddd1d7dcebd1a2b03817cec441 --- includes/parser/Parser.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 116b274c6a..dcc35bd527 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -2656,8 +2656,6 @@ class Parser { case 'revisionsize': # Let the edit saving system know we should parse the page # *after* a revision ID has been assigned. This is for null edits. - $this->mOutput->setFlag( 'vary-revision' ); - wfDebug( __METHOD__ . ": {{REVISIONSIZE}} used, setting vary-revision...\n" ); $value = $this->getRevisionSize(); break; case 'namespace': @@ -5637,7 +5635,7 @@ class Parser { # will change the size. if ( $revObject ) { $this->mRevisionSize = $revObject->getSize(); - } elseif ( $this->ot['wiki'] || $this->mOptions->getIsPreview() ) { + } else { $this->mRevisionSize = $this->mInputSize; } } -- 2.20.1