From: Aaron Schulz Date: Fri, 10 Jun 2016 04:46:54 +0000 (-0700) Subject: Avoid setting vary-revision for {{REVISIONSIZE}} X-Git-Tag: 1.31.0-rc.0~6625 X-Git-Url: https://git.cyclocoop.org/admin/%7B%24plugin.url%7Cescape%7D?a=commitdiff_plain;h=457431b57bd046813cc99385bafd317154a862ab;p=lhc%2Fweb%2Fwiklou.git 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 --- 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; } }