jenkins-bot has submitted this change and it was merged.

Change subject: Use revision timestamp instead of wfTimestampNow()
......................................................................


Use revision timestamp instead of wfTimestampNow()

In some circumstances the revision id can be constructed during one
second and the moderation timestamp set during the next second. This
causes a mismatch between the timestamp embedded in the revision and
the reported moderation time.

This patch changes the revisions to source their moderation timestamp
directly from the revision id.

Change-Id: Ib05da5063c45853d2325b1e14193bfb025c7ad60
---
M includes/Model/AbstractRevision.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Matthias Mullie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Model/AbstractRevision.php 
b/includes/Model/AbstractRevision.php
index 4620f8e..3a14936 100644
--- a/includes/Model/AbstractRevision.php
+++ b/includes/Model/AbstractRevision.php
@@ -265,7 +265,7 @@
                        $obj->moderationTimestamp = null;
                } else {
                        $obj->moderatedBy = UserTuple::newFromUser( $user );
-                       $obj->moderationTimestamp = wfTimestampNow();
+                       $obj->moderationTimestamp = $obj->revId->getTimestamp();
                }
 
                return $obj;

-- 
To view, visit https://gerrit.wikimedia.org/r/175665
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib05da5063c45853d2325b1e14193bfb025c7ad60
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>
Gerrit-Reviewer: Matthias Mullie <mmul...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to