Merge "wfProfileOut() for new return added in c6396 (c4e407c)"
[lhc/web/wiklou.git] / includes / job / RefreshLinksJob.php
index 1aa206f..7ccf00d 100644 (file)
@@ -2,6 +2,21 @@
 /**
  * Job to update links for a given title.
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @file
  * @ingroup JobQueue
  */
@@ -46,8 +61,10 @@ class RefreshLinksJob extends Job {
                $parserOutput = $wgParser->parse( $revision->getText(), $this->title, $options, true, true, $revision->getId() );
                wfProfileOut( __METHOD__.'-parse' );
                wfProfileIn( __METHOD__.'-update' );
-               $update = new LinksUpdate( $this->title, $parserOutput, false );
-               $update->doUpdate();
+
+               $updates = $parserOutput->getSecondaryDataUpdates( $this->title, false );
+               DataUpdate::runUpdates( $updates );
+
                wfProfileOut( __METHOD__.'-update' );
                wfProfileOut( __METHOD__ );
                return true;
@@ -118,8 +135,10 @@ class RefreshLinksJob2 extends Job {
                        $parserOutput = $wgParser->parse( $revision->getText(), $title, $options, true, true, $revision->getId() );
                        wfProfileOut( __METHOD__.'-parse' );
                        wfProfileIn( __METHOD__.'-update' );
-                       $update = new LinksUpdate( $title, $parserOutput, false );
-                       $update->doUpdate();
+
+                       $updates = $parserOutput->getSecondaryDataUpdates( $title, false );
+                       DataUpdate::runUpdates( $updates );
+
                        wfProfileOut( __METHOD__.'-update' );
                        wfWaitForSlaves();
                }