From: Roan Kattouw Date: Mon, 23 May 2016 19:21:45 +0000 (-0700) Subject: Add LinksUpdate::getRevision() X-Git-Tag: 1.31.0-rc.0~6796^2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=01b2516175b582c06f4f78a6283a22d27ba08d27;p=lhc%2Fweb%2Fwiklou.git Add LinksUpdate::getRevision() Similar to getTriggeringUser(). Also propagate it to subjobs similarly. Bug: T135959 Change-Id: I3d894acaf3d85b790e5034c7d9f76bf94672f445 --- 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'] ) {