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
*/
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' ];
}