Merge "Expose LinksUpdate recursive flag with a getter"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 13 Sep 2019 20:04:40 +0000 (20:04 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 13 Sep 2019 20:04:40 +0000 (20:04 +0000)
1  2 
includes/deferred/LinksUpdate.php

@@@ -1066,7 -1066,6 +1066,7 @@@ class LinksUpdate extends DataUpdate 
        private function invalidateProperties( $changed ) {
                global $wgPagePropLinkInvalidations;
  
 +              $jobs = [];
                foreach ( $changed as $name => $value ) {
                        if ( isset( $wgPagePropLinkInvalidations[$name] ) ) {
                                $inv = $wgPagePropLinkInvalidations[$name];
                                        $inv = [ $inv ];
                                }
                                foreach ( $inv as $table ) {
 -                                      DeferredUpdates::addUpdate(
 -                                              new HTMLCacheUpdate( $this->mTitle, $table, 'page-props' )
 +                                      $jobs[] = HTMLCacheUpdateJob::newForBacklinks(
 +                                              $this->mTitle,
 +                                              $table,
 +                                              [ 'causeAction' => 'page-props' ]
                                        );
                                }
                        }
                }
 +
 +              JobQueueGroup::singleton()->lazyPush( $jobs );
        }
  
        /**
  
                return $this->db;
        }
+       /**
+        * Whether or not this LinksUpdate will also update pages which transclude the
+        * current page or otherwise depend on it.
+        *
+        * @return bool
+        */
+       public function isRecursive() {
+               return $this->mRecursive;
+       }
  }