From 01b2516175b582c06f4f78a6283a22d27ba08d27 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 23 May 2016 12:21:45 -0700 Subject: [PATCH] Add LinksUpdate::getRevision() Similar to getTriggeringUser(). Also propagate it to subjobs similarly. Bug: T135959 Change-Id: I3d894acaf3d85b790e5034c7d9f76bf94672f445 --- includes/deferred/LinksUpdate.php | 8 ++++++++ includes/jobqueue/jobs/RefreshLinksJob.php | 1 + 2 files changed, 9 insertions(+) diff --git a/includes/deferred/LinksUpdate.php b/includes/deferred/LinksUpdate.php index 1f7f3b0cbb..928f4b6519 100644 --- a/includes/deferred/LinksUpdate.php +++ b/includes/deferred/LinksUpdate.php @@ -933,6 +933,14 @@ class LinksUpdate extends SqlDataUpdate implements EnqueueableDataUpdate { $this->mRevision = $revision; } + /** + * @since 1.28 + * @return null|Revision + */ + public function getRevision() { + return $this->mRevision; + } + /** * Set the User who triggered this LinksUpdate * diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php b/includes/jobqueue/jobs/RefreshLinksJob.php index b7653be79f..9711496181 100644 --- a/includes/jobqueue/jobs/RefreshLinksJob.php +++ b/includes/jobqueue/jobs/RefreshLinksJob.php @@ -244,6 +244,7 @@ class RefreshLinksJob extends Job { // Needed by things like Echo notifications which need // to know which user caused the links update if ( $update instanceof LinksUpdate ) { + $update->setRevision( $revision ); if ( !empty( $this->params['triggeringUser'] ) ) { $userInfo = $this->params['triggeringUser']; if ( $userInfo['userId'] ) { -- 2.20.1