use ParserOutput::getSecondaryDataUpdates() as the primary method of getting pending...
authordaniel <daniel.kinzler@wikimedia.de>
Tue, 17 Apr 2012 15:54:00 +0000 (17:54 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Tue, 17 Apr 2012 15:54:00 +0000 (17:54 +0200)
includes/WikiPage.php
includes/api/ApiPurge.php
includes/job/RefreshLinksJob.php
includes/parser/ParserOutput.php
maintenance/refreshLinks.php

index 4638546..dac63c9 100644 (file)
@@ -1742,7 +1742,7 @@ class WikiPage extends Page {
                }
 
                # Update the links tables and other secondary data
-        $updates = $editInfo->output->getLinksUpdateAndOtherUpdates( $this->mTitle );
+        $updates = $editInfo->output->getSecondaryDataUpdates( $this->mTitle );
         SecondaryDataUpdate::runUpdates( $updates );
 
                wfRunHooks( 'ArticleEditUpdates', array( &$this, &$editInfo, $options['changed'] ) );
index 77898cf..0f7315f 100644 (file)
@@ -93,7 +93,7 @@ class ApiPurge extends ApiBase {
                                                true, true, $page->getLatest() ); #FIXME: content!
 
                                        # Update the links tables
-                    $updates = $p_result->getLinksUpdateAndOtherUpdates( $title );
+                    $updates = $p_result->getSecondaryDataUpdates( $title );
                     SecondaryDataUpdate::runUpdates( $updates );
 
                                        $r['linkupdate'] = '';
index dcc5ab1..c4efcab 100644 (file)
@@ -47,7 +47,7 @@ class RefreshLinksJob extends Job {
                wfProfileOut( __METHOD__.'-parse' );
                wfProfileIn( __METHOD__.'-update' );
 
-        $updates = $parserOutput->getLinksUpdateAndOtherUpdates( $this->title, false );
+        $updates = $parserOutput->getSecondaryDataUpdates( $this->title, false );
         SecondaryDataUpdate::runUpdates( $updates );
 
         wfProfileOut( __METHOD__.'-update' );
@@ -121,7 +121,7 @@ class RefreshLinksJob2 extends Job {
                        wfProfileOut( __METHOD__.'-parse' );
                        wfProfileIn( __METHOD__.'-update' );
 
-            $updates = $parserOutput->getLinksUpdateAndOtherUpdates( $title, false );
+            $updates = $parserOutput->getSecondaryDataUpdates( $title, false );
             SecondaryDataUpdate::runUpdates( $updates );
 
                        wfProfileOut( __METHOD__.'-update' );
index 9cb247f..5304974 100644 (file)
@@ -463,28 +463,15 @@ class ParserOutput extends CacheTime {
 
     /**
      * Returns any SecondaryDataUpdate jobs to be executed in order to store secondary information
-     * extracted from the page's content.
-     *
-     * This does not automatically include an LinksUpdate object for the links in this ParserOutput instance.
-     * Use getLinksUpdateAndOtherUpdates() if you want that.
-     *
-     * @return array an array of instances of SecondaryDataUpdate
-     */
-    public function getSecondaryDataUpdates() {
-        return $this->mSecondaryDataUpdates;
-    }
-
-    /**
-     * Conveniance method that returns any SecondaryDataUpdate jobs to be executed in order
-     * to store secondary information extracted from the page's content, including the LinksUpdate object
-     * for all links stopred in this ParserOutput object.
+     * extracted from the page's content, includingt a LinksUpdate object for all links stopred in
+     * this ParserOutput object.
      *
      * @param $title Title of the page we're updating. If not given, a title object will be created based on $this->getTitleText()
      * @param $recursive Boolean: queue jobs for recursive updates?
      *
      * @return array an array of instances of SecondaryDataUpdate
      */
-    public function getLinksUpdateAndOtherUpdates( Title $title = null, $recursive = true ) {
+    public function getSecondaryDataUpdates( Title $title = null, $recursive = true ) {
         if ( empty( $title ) ) {
             $title = Title::newFromText( $this->getTitleText() );
         }
index dd8c8a7..4372502 100644 (file)
@@ -222,7 +222,7 @@ class RefreshLinks extends Maintenance {
                $options = new ParserOptions;
                $parserOutput = $wgParser->parse( $revision->getText(), $title, $options, true, true, $revision->getId() );
 
-        $updates = $parserOutput->getLinksUpdateAndOtherUpdates( $title, false );
+        $updates = $parserOutput->getSecondaryDataUpdates( $title, false );
         SecondaryDataUpdate::runUpdates( $updates );
 
         $dbw->commit();