parser: inject the time for {{REVISIONTIMESTAMP}} on pre-save parse
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 19 Apr 2019 01:36:40 +0000 (18:36 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Sun, 9 Jun 2019 12:12:57 +0000 (13:12 +0100)
commite85fe191c91a282fa1d466997a346782644a8870
treec2c66817bf1327dfa49d06a229c962e81fe7ad74
parent7faa7a7420866ec685863c1d6c530bd4999da643
parser: inject the time for {{REVISIONTIMESTAMP}} on pre-save parse

DerivedPageDataUpdater::prepareContent already locks in the revision
timestamp before insertion, so inject that into the parser options
used for any pre-save parse (e.g for edit filters).

This means that a reparse is no longer needed within in the same save
request to get the post-save canonical output. A parse will still be
required if the edit filter output used an edit stash output, since
the revision timestamp is not set at stash time.

Instead of using vary-revision, add a vary-revision-timestamp flag
for the revision timestamp words. The month/day/hour variants retain
their prior optimizations for allowing edit stash output reuse for
the post-save canonical output.

Change-Id: Ic2c13db4d21197c79a89de0de56745ca32918eb6
includes/GlobalFunctions.php
includes/Revision/RenderedRevision.php
includes/Revision/RevisionRenderer.php
includes/Storage/DerivedPageDataUpdater.php
includes/Storage/PageEditStash.php
includes/page/WikiPage.php
includes/parser/Parser.php
includes/parser/ParserOptions.php
includes/parser/ParserOutput.php