* Avoid setting mTimestamp in doEditContent() until the edit was
comitted. Null edits do not even try to add $revision to the DB,
so do not set mTimestamp at all in that case.
* This avoids the problem where ParserCache used a bad getTimestamp()
value to set the ParserOutput timestamp via setTimestamp(), which
Article later uses as the "last modified" timestamp.
Bug: T112609
Change-Id: I79d7777c7f7470ff421ffeda80ac60dca07653fb
$dbw = wfGetDB( DB_MASTER );
$now = wfTimestampNow();
- $this->mTimestamp = $now;
if ( $flags & EDIT_UPDATE ) {
// Update article, but only if changed.
$user->incEditCount();
$dbw->commit( __METHOD__ );
+ $this->mTimestamp = $now;
} else {
// Bug 32948: revision ID must be set to page {{REVISIONID}} and
// related variables correctly
$user->incEditCount();
$dbw->commit( __METHOD__ );
+ $this->mTimestamp = $now;
// Update links, etc.
$this->doEditUpdates( $revision, $user, array( 'created' => true ) );