Addshore has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/271487

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/87/271487/1

diff --git a/includes/changes/CategoryMembershipChange.php 
b/includes/changes/CategoryMembershipChange.php
index 30906b8..9acead9 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: newchange
Gerrit-Change-Id: Ia270451ccb02f2fca979ccb1fcefa5bdb4a96722
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>

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

Reply via email to