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

Change subject: CatMembChange use timestamp from revision where possible
......................................................................


CatMembChange use timestamp from revision where possible

This should mean that where possible the timestamp for
the category membership change will be equal to that of
the time of the revision that caused the change.

The IDs still may have space between them.

Bug: T126048
Change-Id: Ia270451ccb02f2fca979ccb1fcefa5bdb4a96722
---
M includes/changes/CategoryMembershipChange.php
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/changes/CategoryMembershipChange.php 
b/includes/changes/CategoryMembershipChange.php
index 30906b8..1ff6f85 100644
--- a/includes/changes/CategoryMembershipChange.php
+++ b/includes/changes/CategoryMembershipChange.php
@@ -65,7 +65,11 @@
         */
        public function __construct( Title $pageTitle, Revision $revision = 
null ) {
                $this->pageTitle = $pageTitle;
-               $this->timestamp = wfTimestampNow();
+               if ( $revision === null ) {
+                       $this->timestamp = wfTimestampNow();
+               } else {
+                       $this->timestamp = $revision->getTimestamp();
+               }
                $this->revision = $revision;
                $this->newForCategorizationCallback = [ 'RecentChange', 
'newForCategorization' ];
        }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia270451ccb02f2fca979ccb1fcefa5bdb4a96722
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to