Merge "Fix mw.notify not being visible if first loaded when scrolled down"
[lhc/web/wiklou.git] / includes / deferred / LinksUpdate.php
index be5aff3..d996870 100644 (file)
@@ -25,7 +25,7 @@
  *
  * @todo document (e.g. one-sentence top-level class description).
  */
-class LinksUpdate extends SqlDataUpdate {
+class LinksUpdate extends SqlDataUpdate implements EnqueueableDataUpdate {
        // @todo make members protected, but make sure extensions don't break
 
        /** @var int Page ID of the article linked from */
@@ -934,4 +934,16 @@ class LinksUpdate extends SqlDataUpdate {
                        );
                }
        }
+
+       public function getAsJobSpecification() {
+               return array(
+                       'wiki' => $this->mDb->getWikiID(),
+                       'job'  => new JobSpecification(
+                               'refreshLinks',
+                               array( 'prioritize' => true ),
+                               array( 'removeDuplicates' => true ),
+                               $this->getTitle()
+                       )
+               );
+       }
 }