Merge "Enable users to watch category membership changes #2"
[lhc/web/wiklou.git] / includes / page / WikiPage.php
index 29038c7..cdaab1a 100644 (file)
@@ -2182,6 +2182,9 @@ class WikiPage implements Page, IDBAccessObject {
                        $updates = $content->getSecondaryDataUpdates(
                                $this->getTitle(), null, $recursive, $editInfo->output );
                        foreach ( $updates as $update ) {
+                               if ( $update instanceof LinksUpdate ) {
+                                       $update->setRevision( $revision );
+                               }
                                DeferredUpdates::addUpdate( $update );
                        }
                }
@@ -3489,11 +3492,7 @@ class WikiPage implements Page, IDBAccessObject {
                if ( $this->getLinksTimestamp() < $this->getTouched() ) {
                        $params['isOpportunistic'] = true;
                        $params['rootJobTimestamp'] = $parserOutput->getCacheTime();
-
-                       JobQueueGroup::singleton()->lazyPush( EnqueueJob::newFromLocalJobs(
-                               new JobSpecification( 'refreshLinks', $params,
-                                       array( 'removeDuplicates' => true ), $this->mTitle )
-                       ) );
+                       JobQueueGroup::singleton()->lazyPush( new RefreshLinksJob( $this->mTitle, $params ) );
                }
        }