Properly make LinksUpdate be recursive when done from job queue
authorBrian Wolff <bawolff+wn@gmail.com>
Thu, 22 Oct 2015 18:56:03 +0000 (12:56 -0600)
committerBrian Wolff <bawolff+wn@gmail.com>
Thu, 22 Oct 2015 18:56:03 +0000 (12:56 -0600)
New enqueue method of DeferredUpdates was turning LinksUpdate
updates into Jobs. However RefreshLinksJob was not properly
reconstructing the secondary updates as being recursive (if they
were recursive). This means that templates weren't having the pages
that were using them being updated.

See also related T116001.

Change-Id: Ia06246efb2034fdfe07232fd8c2334160edbcf02

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

index 5a7efca..fa09b37 100644 (file)
@@ -996,7 +996,8 @@ class LinksUpdate extends SqlDataUpdate implements EnqueueableDataUpdate {
                                array(
                                        'prioritize' => true,
                                        // Reuse the parser cache if it was saved
-                                       'rootJobTimestamp' => $this->mParserOutput->getCacheTime()
+                                       'rootJobTimestamp' => $this->mParserOutput->getCacheTime(),
+                                       'useRecursiveLinksUpdate' => $this->mRecursive
                                ),
                                array( 'removeDuplicates' => true ),
                                $this->getTitle()
index 7093e14..1d59b32 100644 (file)
@@ -197,7 +197,8 @@ class RefreshLinksJob extends Job {
                        }
                }
 
-               $updates = $content->getSecondaryDataUpdates( $title, null, false, $parserOutput );
+               $updates = $content->getSecondaryDataUpdates(
+                       $title, null, !empty( $this->params['useRecursiveLinksUpdate'] ), $parserOutput );
                foreach ( $updates as $key => $update ) {
                        if ( $update instanceof LinksUpdate && isset( $this->params['triggeredRecursive'] ) ) {
                                $update->setTriggeredRecursive();