Remove obsolete category links code
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 6 Dec 2015 00:07:50 +0000 (16:07 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Sun, 6 Dec 2015 00:07:59 +0000 (16:07 -0800)
* These calls and methods should no longer be needed
* Follow-up to 6dedffc2d7f8

Change-Id: Iff121263610117112c84edb5e575f039456d1ac8

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

index f9d7e9c..755a7cd 100644 (file)
@@ -61,9 +61,6 @@ class LinksUpdate extends SqlDataUpdate implements EnqueueableDataUpdate {
        /** @var bool Whether to queue jobs for recursive updates */
        public $mRecursive;
 
-       /** @var bool Whether this job was triggered by a recursive update job */
-       private $mTriggeredRecursive;
-
        /** @var Revision Revision for which this update has been triggered */
        private $mRevision;
 
@@ -868,15 +865,6 @@ class LinksUpdate extends SqlDataUpdate implements EnqueueableDataUpdate {
                return $this->mImages;
        }
 
-       /**
-        * Set this object as being triggered by a recursive LinksUpdate
-        *
-        * @since 1.27
-        */
-       public function setTriggeredRecursive() {
-               $this->mTriggeredRecursive = true;
-       }
-
        /**
         * Set the revision corresponding to this LinksUpdate
         *
index fa3278d..0314352 100644 (file)
@@ -229,30 +229,6 @@ class RefreshLinksJob extends Job {
                        $parserOutput
                );
 
-               foreach ( $updates as $key => $update ) {
-                       // FIXME: move category change RC stuff to a separate update.
-                       // RC entry addition aborts if edits where since made, which is not necessary.
-                       // It's also an SoC violation for links update code to care about RC.
-                       if ( $update instanceof LinksUpdate ) {
-                               if ( !empty( $this->params['triggeredRecursive'] ) ) {
-                                       $update->setTriggeredRecursive();
-                               }
-                               if ( !empty( $this->params['triggeringUser'] ) ) {
-                                       $userInfo = $this->params['triggeringUser'];
-                                       if ( $userInfo['userId'] ) {
-                                               $user = User::newFromId( $userInfo['userId'] );
-                                       } else {
-                                               // Anonymous, use the username
-                                               $user = User::newFromName( $userInfo['userName'], false );
-                                       }
-                                       $update->setTriggeringUser( $user );
-                               }
-                               if ( !empty( $this->params['triggeringRevisionId'] ) ) {
-                                       $update->setRevision( $revision );
-                               }
-                       }
-               }
-
                $latestNow = $page->lockAndGetLatest();
                if ( !$latestNow || $revision->getId() != $latestNow ) {
                        // Do not clobber over newer updates with older ones. If all jobs where FIFO and