Merge "Drop outdated "documentation reviewed" tags"
[lhc/web/wiklou.git] / includes / page / WikiPage.php
index cb2e396..5527ace 100644 (file)
@@ -555,7 +555,6 @@ class WikiPage implements Page, IDBAccessObject {
         * @return Revision|null
         */
        public function getOldestRevision() {
-               wfProfileIn( __METHOD__ );
 
                // Try using the slave database first, then try the master
                $continue = 2;
@@ -586,7 +585,6 @@ class WikiPage implements Page, IDBAccessObject {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $row ? Revision::newFromRow( $row ) : null;
        }
 
@@ -1053,7 +1051,6 @@ class WikiPage implements Page, IDBAccessObject {
         * @return array Array of authors, duplicates not removed
         */
        public function getLastNAuthors( $num, $revLatest = 0 ) {
-               wfProfileIn( __METHOD__ );
                // First try the slave
                // If that doesn't have the latest revision, try the master
                $continue = 2;
@@ -1074,7 +1071,6 @@ class WikiPage implements Page, IDBAccessObject {
                        );
 
                        if ( !$res ) {
-                               wfProfileOut( __METHOD__ );
                                return array();
                        }
 
@@ -1094,7 +1090,6 @@ class WikiPage implements Page, IDBAccessObject {
                        $authors[] = $row->rev_user_text;
                }
 
-               wfProfileOut( __METHOD__ );
                return $authors;
        }
 
@@ -1127,7 +1122,6 @@ class WikiPage implements Page, IDBAccessObject {
         * @return ParserOutput|bool ParserOutput or false if the revision was not found
         */
        public function getParserOutput( ParserOptions $parserOptions, $oldid = null ) {
-               wfProfileIn( __METHOD__ );
 
                $useParserCache = $this->isParserCacheUsed( $parserOptions, $oldid );
                wfDebug( __METHOD__ . ': using parser cache: ' . ( $useParserCache ? 'yes' : 'no' ) . "\n" );
@@ -1138,7 +1132,6 @@ class WikiPage implements Page, IDBAccessObject {
                if ( $useParserCache ) {
                        $parserOutput = ParserCache::singleton()->get( $this, $parserOptions );
                        if ( $parserOutput !== false ) {
-                               wfProfileOut( __METHOD__ );
                                return $parserOutput;
                        }
                }
@@ -1150,8 +1143,6 @@ class WikiPage implements Page, IDBAccessObject {
                $pool = new PoolWorkArticleView( $this, $parserOptions, $oldid, $useParserCache );
                $pool->execute();
 
-               wfProfileOut( __METHOD__ );
-
                return $pool->getParserOutput();
        }
 
@@ -1226,7 +1217,6 @@ class WikiPage implements Page, IDBAccessObject {
         * @return int The newly created page_id key, or false if the title already existed
         */
        public function insertOn( $dbw ) {
-               wfProfileIn( __METHOD__ );
 
                $page_id = $dbw->nextSequenceValue( 'page_page_id_seq' );
                $dbw->insert( 'page', array(
@@ -1249,7 +1239,6 @@ class WikiPage implements Page, IDBAccessObject {
                        $this->mId = $newid;
                        $this->mTitle->resetArticleID( $newid );
                }
-               wfProfileOut( __METHOD__ );
 
                return $affected ? $newid : false;
        }
@@ -1272,8 +1261,6 @@ class WikiPage implements Page, IDBAccessObject {
        ) {
                global $wgContentHandlerUseDB;
 
-               wfProfileIn( __METHOD__ );
-
                $content = $revision->getContent();
                $len = $content ? $content->getSize() : 0;
                $rt = $content ? $content->getUltimateRedirectTarget() : null;
@@ -1315,7 +1302,6 @@ class WikiPage implements Page, IDBAccessObject {
                                                                                                        $this->mLatest, $revision->getContentModel() );
                }
 
-               wfProfileOut( __METHOD__ );
                return $result;
        }
 
@@ -1340,7 +1326,6 @@ class WikiPage implements Page, IDBAccessObject {
                        return true;
                }
 
-               wfProfileIn( __METHOD__ );
                if ( $isRedirect ) {
                        $this->insertRedirectEntry( $redirectTitle );
                } else {
@@ -1352,7 +1337,6 @@ class WikiPage implements Page, IDBAccessObject {
                if ( $this->getTitle()->getNamespace() == NS_FILE ) {
                        RepoGroup::singleton()->getLocalRepo()->invalidateImageRedirect( $this->getTitle() );
                }
-               wfProfileOut( __METHOD__ );
 
                return ( $dbw->affectedRows() != 0 );
        }
@@ -1368,7 +1352,6 @@ class WikiPage implements Page, IDBAccessObject {
         * @return bool
         */
        public function updateIfNewerOn( $dbw, $revision ) {
-               wfProfileIn( __METHOD__ );
 
                $row = $dbw->selectRow(
                        array( 'revision', 'page' ),
@@ -1380,7 +1363,6 @@ class WikiPage implements Page, IDBAccessObject {
 
                if ( $row ) {
                        if ( wfTimestamp( TS_MW, $row->rev_timestamp ) >= $revision->getTimestamp() ) {
-                               wfProfileOut( __METHOD__ );
                                return false;
                        }
                        $prev = $row->rev_id;
@@ -1393,7 +1375,6 @@ class WikiPage implements Page, IDBAccessObject {
 
                $ret = $this->updateRevisionOn( $dbw, $revision, $prev, $lastRevIsRedirect );
 
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
@@ -1512,7 +1493,6 @@ class WikiPage implements Page, IDBAccessObject {
         */
        public function replaceSectionContent( $sectionId, Content $sectionContent, $sectionTitle = '',
                $edittime = null ) {
-               wfProfileIn( __METHOD__ );
 
                $baseRevId = null;
                if ( $edittime && $sectionId !== 'new' ) {
@@ -1523,7 +1503,6 @@ class WikiPage implements Page, IDBAccessObject {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $this->replaceSectionAtRev( $sectionId, $sectionContent, $sectionTitle, $baseRevId );
        }
 
@@ -1543,14 +1522,12 @@ class WikiPage implements Page, IDBAccessObject {
        public function replaceSectionAtRev( $sectionId, Content $sectionContent,
                $sectionTitle = '', $baseRevId = null
        ) {
-               wfProfileIn( __METHOD__ );
 
                if ( strval( $sectionId ) === '' ) {
                        // Whole-page edit; let the whole text through
                        $newContent = $sectionContent;
                } else {
                        if ( !$this->supportsSections() ) {
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( "sections not supported for content model " .
                                        $this->getContentHandler()->getModelID() );
                        }
@@ -1566,7 +1543,6 @@ class WikiPage implements Page, IDBAccessObject {
                                if ( !$rev ) {
                                        wfDebug( __METHOD__ . " asked for bogus section (page: " .
                                                $this->getId() . "; section: $sectionId)\n" );
-                                       wfProfileOut( __METHOD__ );
                                        return null;
                                }
 
@@ -1575,14 +1551,12 @@ class WikiPage implements Page, IDBAccessObject {
 
                        if ( !$oldContent ) {
                                wfDebug( __METHOD__ . ": no page text\n" );
-                               wfProfileOut( __METHOD__ );
                                return null;
                        }
 
                        $newContent = $oldContent->replaceSection( $sectionId, $sectionContent, $sectionTitle );
                }
 
-               wfProfileOut( __METHOD__ );
                return $newContent;
        }
 
@@ -1632,7 +1606,9 @@ class WikiPage implements Page, IDBAccessObject {
         * error will be returned. These two conditions are also possible with
         * auto-detection due to MediaWiki's performance-optimised locking strategy.
         *
-        * @param bool|int $baseRevId The revision ID this edit was based off, if any
+        * @param bool|int $baseRevId The revision ID this edit was based off, if any.
+        *   This is not the parent revision ID, rather the revision ID for older
+        *   content used as the source for a rollback, for example.
         * @param User $user The user doing the edit
         *
         * @throws MWException
@@ -1692,7 +1668,9 @@ class WikiPage implements Page, IDBAccessObject {
         * error will be returned. These two conditions are also possible with
         * auto-detection due to MediaWiki's performance-optimised locking strategy.
         *
-        * @param bool|int $baseRevId The revision ID this edit was based off, if any
+        * @param bool|int $baseRevId The revision ID this edit was based off, if any.
+        *   This is not the parent revision ID, rather the revision ID for older
+        *   content used as the source for a rollback, for example.
         * @param User $user The user doing the edit
         * @param string $serialFormat Format for storing the content in the
         *   database.
@@ -1724,10 +1702,7 @@ class WikiPage implements Page, IDBAccessObject {
                        throw new MWException( 'Something is trying to edit an article with an empty title' );
                }
 
-               wfProfileIn( __METHOD__ );
-
                if ( !$content->getContentHandler()->canBeUsedOn( $this->getTitle() ) ) {
-                       wfProfileOut( __METHOD__ );
                        return Status::newFatal( 'content-not-allowed-here',
                                ContentHandler::getLocalizedName( $content->getModel() ),
                                $this->getTitle()->getPrefixedText() );
@@ -1756,7 +1731,6 @@ class WikiPage implements Page, IDBAccessObject {
                                $status->fatal( 'edit-hook-aborted' );
                        }
 
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
@@ -1803,11 +1777,9 @@ class WikiPage implements Page, IDBAccessObject {
                                wfDebug( __METHOD__ . ": EDIT_UPDATE specified but article doesn't exist\n" );
                                $status->fatal( 'edit-gone-missing' );
 
-                               wfProfileOut( __METHOD__ );
                                return $status;
                        } elseif ( !$old_content ) {
                                // Sanity check for bug 37225
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( "Could not find text for current revision {$oldid}." );
                        }
 
@@ -1832,13 +1804,12 @@ class WikiPage implements Page, IDBAccessObject {
                                $dbw->begin( __METHOD__ );
                                try {
 
-                                       $prepStatus = $content->prepareSave( $this, $flags, $baseRevId, $user );
+                                       $prepStatus = $content->prepareSave( $this, $flags, $oldid, $user );
                                        $status->merge( $prepStatus );
 
                                        if ( !$status->isOK() ) {
                                                $dbw->rollback( __METHOD__ );
 
-                                               wfProfileOut( __METHOD__ );
                                                return $status;
                                        }
                                        $revisionId = $revision->insertOn( $dbw );
@@ -1854,7 +1825,6 @@ class WikiPage implements Page, IDBAccessObject {
 
                                                $dbw->rollback( __METHOD__ );
 
-                                               wfProfileOut( __METHOD__ );
                                                return $status;
                                        }
 
@@ -1876,7 +1846,7 @@ class WikiPage implements Page, IDBAccessObject {
                                                }
                                        }
                                        $user->incEditCount();
-                               } catch ( MWException $e ) {
+                               } catch ( Exception $e ) {
                                        $dbw->rollback( __METHOD__ );
                                        // Question: Would it perhaps be better if this method turned all
                                        // exceptions into $status's?
@@ -1913,13 +1883,12 @@ class WikiPage implements Page, IDBAccessObject {
                        $dbw->begin( __METHOD__ );
                        try {
 
-                               $prepStatus = $content->prepareSave( $this, $flags, $baseRevId, $user );
+                               $prepStatus = $content->prepareSave( $this, $flags, $oldid, $user );
                                $status->merge( $prepStatus );
 
                                if ( !$status->isOK() ) {
                                        $dbw->rollback( __METHOD__ );
 
-                                       wfProfileOut( __METHOD__ );
                                        return $status;
                                }
 
@@ -1933,7 +1902,6 @@ class WikiPage implements Page, IDBAccessObject {
                                        $dbw->rollback( __METHOD__ );
                                        $status->fatal( 'edit-already-exists' );
 
-                                       wfProfileOut( __METHOD__ );
                                        return $status;
                                }
 
@@ -1981,7 +1949,7 @@ class WikiPage implements Page, IDBAccessObject {
                                }
                                $user->incEditCount();
 
-                       } catch ( MWException $e ) {
+                       } catch ( Exception $e ) {
                                $dbw->rollback( __METHOD__ );
                                throw $e;
                        }
@@ -2016,7 +1984,6 @@ class WikiPage implements Page, IDBAccessObject {
                        $user->addAutopromoteOnceGroups( 'onEdit' );
                } );
 
-               wfProfileOut( __METHOD__ );
                return $status;
        }
 
@@ -2064,7 +2031,8 @@ class WikiPage implements Page, IDBAccessObject {
         * Returns a stdClass with source, pst and output members
         *
         * @param Content $content
-        * @param int|null $revid
+        * @param Revision|int|null $revision Revision object. For backwards compatibility, a
+        *        revision ID is also accepted, but this is deprecated.
         * @param User|null $user
         * @param string|null $serialFormat
         * @param bool $useCache Check shared prepared edit cache
@@ -2074,9 +2042,22 @@ class WikiPage implements Page, IDBAccessObject {
         * @since 1.21
         */
        public function prepareContentForEdit(
-               Content $content, $revid = null, User $user = null, $serialFormat = null, $useCache = true
+               Content $content, $revision = null, User $user = null, $serialFormat = null, $useCache = true
        ) {
-               global $wgContLang, $wgUser;
+               global $wgContLang, $wgUser, $wgAjaxEditStash;
+
+               if ( is_object( $revision ) ) {
+                       $revid = $revision->getId();
+               } else {
+                       $revid = $revision;
+                       // This code path is deprecated, and nothing is known to
+                       // use it, so performance here shouldn't be a worry.
+                       if ( $revid !== null ) {
+                               $revision = Revision::newFromId( $revid, Revision::READ_LATEST );
+                       } else {
+                               $revision = null;
+                       }
+               }
 
                $user = is_null( $user ) ? $wgUser : $user;
                //XXX: check $user->getId() here???
@@ -2098,7 +2079,7 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                // The edit may have already been prepared via api.php?action=stashedit
-               $cachedEdit = $useCache
+               $cachedEdit = $useCache && $wgAjaxEditStash
                        ? ApiStashEdit::checkCache( $this->getTitle(), $content, $user )
                        : false;
 
@@ -2127,6 +2108,25 @@ class WikiPage implements Page, IDBAccessObject {
                if ( $cachedEdit ) {
                        $edit->output = $cachedEdit->output;
                } else {
+                       if ( $revision ) {
+                               // We get here if vary-revision is set. This means that this page references
+                               // itself (such as via self-transclusion). In this case, we need to make sure
+                               // that any such self-references refer to the newly-saved revision, and not
+                               // to the previous one, which could otherwise happen due to slave lag.
+                               $oldCallback = $edit->popts->setCurrentRevisionCallback(
+                                       function ( $title, $parser = false ) use ( $revision, &$oldCallback ) {
+                                               if ( $title->equals( $revision->getTitle() ) ) {
+                                                       return $revision;
+                                               } else {
+                                                       return call_user_func(
+                                                               $oldCallback,
+                                                               $title,
+                                                               $parser
+                                                       );
+                                               }
+                                       }
+                               );
+                       }
                        $edit->output = $edit->pstContent
                                ? $edit->pstContent->getParserOutput( $this->mTitle, $revid, $edit->popts )
                                : null;
@@ -2156,16 +2156,16 @@ class WikiPage implements Page, IDBAccessObject {
         * - changed: boolean, whether the revision changed the content (default true)
         * - created: boolean, whether the revision created the page (default false)
         * - moved: boolean, whether the page was moved (default false)
-        * - oldcountable: boolean or null (default null):
+        * - oldcountable: boolean, null, or string 'no-change' (default null):
         *   - boolean: whether the page was counted as an article before that
         *     revision, only used in changed is true and created is false
-        *   - null: don't change the article count
+        *   - null: if created is false, don't update the article count; if created
+        *     is true, do update the article count
+        *   - 'no-change': don't update the article count, ever
         */
        public function doEditUpdates( Revision $revision, User $user, array $options = array() ) {
                global $wgEnableParserCache;
 
-               wfProfileIn( __METHOD__ );
-
                $options += array(
                        'changed' => true,
                        'created' => false,
@@ -2179,7 +2179,7 @@ class WikiPage implements Page, IDBAccessObject {
                // already pre-save transformed once.
                if ( !$this->mPreparedEdit || $this->mPreparedEdit->output->getFlag( 'vary-revision' ) ) {
                        wfDebug( __METHOD__ . ": No prepared edit or vary-revision is set...\n" );
-                       $editInfo = $this->prepareContentForEdit( $content, $revision->getId(), $user );
+                       $editInfo = $this->prepareContentForEdit( $content, $revision, $user );
                } else {
                        wfDebug( __METHOD__ . ": No vary-revision, using prepared edit...\n" );
                        $editInfo = $this->mPreparedEdit;
@@ -2204,15 +2204,11 @@ class WikiPage implements Page, IDBAccessObject {
                Hooks::run( 'ArticleEditUpdates', array( &$this, &$editInfo, $options['changed'] ) );
 
                if ( Hooks::run( 'ArticleEditUpdatesDeleteFromRecentchanges', array( &$this ) ) ) {
-                       if ( 0 == mt_rand( 0, 99 ) ) {
-                               // Flush old entries from the `recentchanges` table; we do this on
-                               // random requests so as to avoid an increase in writes for no good reason
-                               RecentChange::purgeExpiredChanges();
-                       }
+                       // Flush old entries from the `recentchanges` table
+                       JobQueueGroup::singleton()->push( RecentChangesUpdateJob::newPurgeJob() );
                }
 
                if ( !$this->exists() ) {
-                       wfProfileOut( __METHOD__ );
                        return;
                }
 
@@ -2220,7 +2216,9 @@ class WikiPage implements Page, IDBAccessObject {
                $title = $this->mTitle->getPrefixedDBkey();
                $shortTitle = $this->mTitle->getDBkey();
 
-               if ( !$options['changed'] && !$options['moved'] ) {
+               if ( $options['oldcountable'] === 'no-change' ||
+                       ( !$options['changed'] && !$options['moved'] )
+               ) {
                        $good = 0;
                } elseif ( $options['created'] ) {
                        $good = (int)$this->isCountable( $editInfo );
@@ -2277,7 +2275,6 @@ class WikiPage implements Page, IDBAccessObject {
                        self::onArticleEdit( $this->mTitle );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -2313,7 +2310,6 @@ class WikiPage implements Page, IDBAccessObject {
        public function doQuickEditContent( Content $content, User $user, $comment = '', $minor = false,
                $serialFormat = null
        ) {
-               wfProfileIn( __METHOD__ );
 
                $serialized = $content->serialize( $serialFormat );
 
@@ -2333,7 +2329,6 @@ class WikiPage implements Page, IDBAccessObject {
 
                Hooks::run( 'NewRevisionFromEditComplete', array( $this, $revision, false, $user ) );
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -3024,8 +3019,8 @@ class WikiPage implements Page, IDBAccessObject {
 
                // Get the last edit not by this guy...
                // Note: these may not be public values
-               $user = intval( $current->getRawUser() );
-               $user_text = $dbw->addQuotes( $current->getRawUserText() );
+               $user = intval( $current->getUser( Revision::RAW ) );
+               $user_text = $dbw->addQuotes( $current->getUserText( Revision::RAW ) );
                $s = $dbw->selectRow( 'revision',
                        array( 'rev_id', 'rev_timestamp', 'rev_deleted' ),
                        array( 'rev_page' => $current->getPage(),
@@ -3068,7 +3063,7 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                // Generate the edit summary if necessary
-               $target = Revision::newFromId( $s->rev_id );
+               $target = Revision::newFromId( $s->rev_id, Revision::READ_LATEST );
                if ( empty( $summary ) ) {
                        if ( $from == '' ) { // no public user name
                                $summary = wfMessage( 'revertpage-nouser' );
@@ -3154,13 +3149,9 @@ class WikiPage implements Page, IDBAccessObject {
         *
         * @param Title $title
         */
-       public static function onArticleCreate( $title ) {
+       public static function onArticleCreate( Title $title ) {
                // Update existence markers on article/talk tabs...
-               if ( $title->isTalkPage() ) {
-                       $other = $title->getSubjectPage();
-               } else {
-                       $other = $title->getTalkPage();
-               }
+               $other = $title->getOtherPage();
 
                $other->invalidateCache();
                $other->purgeSquid();
@@ -3175,13 +3166,9 @@ class WikiPage implements Page, IDBAccessObject {
         *
         * @param Title $title
         */
-       public static function onArticleDelete( $title ) {
+       public static function onArticleDelete( Title $title ) {
                // Update existence markers on article/talk tabs...
-               if ( $title->isTalkPage() ) {
-                       $other = $title->getSubjectPage();
-               } else {
-                       $other = $title->getTalkPage();
-               }
+               $other = $title->getOtherPage();
 
                $other->invalidateCache();
                $other->purgeSquid();
@@ -3220,10 +3207,8 @@ class WikiPage implements Page, IDBAccessObject {
         * Purge caches on page update etc
         *
         * @param Title $title
-        * @todo Verify that $title is always a Title object (and never false or
-        *   null), add Title hint to parameter $title.
         */
-       public static function onArticleEdit( $title ) {
+       public static function onArticleEdit( Title $title ) {
                // Invalidate caches of articles which include this page
                DeferredUpdates::addHTMLCacheUpdate( $title, 'templatelinks' );
 
@@ -3395,70 +3380,37 @@ class WikiPage implements Page, IDBAccessObject {
        }
 
        /**
-        * Updates cascading protections
+        * Opportunistically enqueue link update jobs given fresh parser output if useful
         *
-        * @param ParserOutput $parserOutput ParserOutput object for the current version
+        * @param ParserOutput $parserOutput Current version page output
+        * @return bool Whether a job was pushed
+        * @since 1.25
         */
-       public function doCascadeProtectionUpdates( ParserOutput $parserOutput ) {
-               if ( wfReadOnly() || !$this->mTitle->areRestrictionsCascading() ) {
-                       return;
-               }
-
-               // templatelinks or imagelinks tables may have become out of sync,
-               // especially if using variable-based transclusions.
-               // For paranoia, check if things have changed and if
-               // so apply updates to the database. This will ensure
-               // that cascaded protections apply as soon as the changes
-               // are visible.
-
-               // Get templates from templatelinks and images from imagelinks
-               $id = $this->getId();
-
-               $dbLinks = array();
-
-               $dbr = wfGetDB( DB_SLAVE );
-               $res = $dbr->select( array( 'templatelinks' ),
-                       array( 'tl_namespace', 'tl_title' ),
-                       array( 'tl_from' => $id ),
-                       __METHOD__
-               );
-
-               foreach ( $res as $row ) {
-                       $dbLinks["{$row->tl_namespace}:{$row->tl_title}"] = true;
+       public function triggerOpportunisticLinksUpdate( ParserOutput $parserOutput ) {
+               if ( wfReadOnly() ) {
+                       return false;
                }
 
-               $dbr = wfGetDB( DB_SLAVE );
-               $res = $dbr->select( array( 'imagelinks' ),
-                       array( 'il_to' ),
-                       array( 'il_from' => $id ),
-                       __METHOD__
-               );
-
-               foreach ( $res as $row ) {
-                       $dbLinks[NS_FILE . ":{$row->il_to}"] = true;
+               if ( $this->mTitle->areRestrictionsCascading() ) {
+                       // If the page is cascade protecting, the links should really be up-to-date
+                       $params = array( 'prioritize' => true );
+               } elseif ( $parserOutput->hasDynamicContent() ) {
+                       // Assume the output contains time/random based magic words
+                       $params = array();
+               } else {
+                       // If the inclusions are deterministic, the edit-triggered link jobs are enough
+                       return false;
                }
 
-               // Get templates and images from parser output.
-               $poLinks = array();
-               foreach ( $parserOutput->getTemplates() as $ns => $templates ) {
-                       foreach ( $templates as $dbk => $id ) {
-                               $poLinks["$ns:$dbk"] = true;
-                       }
-               }
-               foreach ( $parserOutput->getImages() as $dbk => $id ) {
-                       $poLinks[NS_FILE . ":$dbk"] = true;
+               // Check if the last link refresh was before page_touched
+               if ( $this->getLinksTimestamp() < $this->getTouched() ) {
+                       JobQueueGroup::singleton()->push( EnqueueJob::newFromLocalJobs(
+                               new JobSpecification( 'refreshLinks', $params, array(), $this->mTitle )
+                       ) );
+                       return true;
                }
 
-               // Get the diff
-               $links_diff = array_diff_key( $poLinks, $dbLinks );
-
-               if ( count( $links_diff ) > 0 ) {
-                       // Whee, link updates time.
-                       // Note: we are only interested in links here. We don't need to get
-                       // other DataUpdate items from the parser output.
-                       $u = new LinksUpdate( $this->mTitle, $parserOutput, false );
-                       $u->doUpdate();
-               }
+               return false;
        }
 
        /**