From: addshore Date: Thu, 18 Feb 2016 10:45:04 +0000 (+0000) Subject: CatMembChange use timestamp from revision where possible X-Git-Tag: 1.31.0-rc.0~7889^2 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=69566788e0dee901a6db9d5435e67b052f75f7c6;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/changes/CategoryMembershipChange.php b/includes/changes/CategoryMembershipChange.php index 30906b82ad..1ff6f85237 100644 --- a/includes/changes/CategoryMembershipChange.php +++ b/includes/changes/CategoryMembershipChange.php @@ -65,7 +65,11 @@ class CategoryMembershipChange { */ 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' ]; }