Add LinksUpdate::getRevision()
authorRoan Kattouw <roan.kattouw@gmail.com>
Mon, 23 May 2016 19:21:45 +0000 (12:21 -0700)
committerRoan Kattouw <roan.kattouw@gmail.com>
Thu, 26 May 2016 22:43:22 +0000 (15:43 -0700)
Similar to getTriggeringUser(). Also propagate it
to subjobs similarly.

Bug: T135959
Change-Id: I3d894acaf3d85b790e5034c7d9f76bf94672f445

includes/deferred/LinksUpdate.php
includes/jobqueue/jobs/RefreshLinksJob.php

index 1f7f3b0..928f4b6 100644 (file)
@@ -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
         *
index b7653be..9711496 100644 (file)
@@ -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'] ) {