Merge "Add autocomplete for WhatLinksHere subpages"
[lhc/web/wiklou.git] / includes / deferred / LinksUpdate.php
index 631f739..822c964 100644 (file)
@@ -31,7 +31,7 @@ class LinksUpdate extends SqlDataUpdate {
        /** @var int Page ID of the article linked from */
        public $mId;
 
-       /** @var Title object of the article linked from */
+       /** @var Title Title object of the article linked from */
        public $mTitle;
 
        /** @var ParserOutput */
@@ -52,7 +52,7 @@ class LinksUpdate extends SqlDataUpdate {
        /** @var array Map of category names to sort keys */
        public $mCategories;
 
-       /** @var array ap of language codes to titles */
+       /** @var array Map of language codes to titles */
        public $mInterlangs;
 
        /** @var array Map of arbitrary name to value */
@@ -140,20 +140,19 @@ class LinksUpdate extends SqlDataUpdate {
 
                $this->mRecursive = $recursive;
 
-               wfRunHooks( 'LinksUpdateConstructed', array( &$this ) );
+               Hooks::run( 'LinksUpdateConstructed', array( &$this ) );
        }
 
        /**
         * Update link tables with outgoing links from an updated article
         */
        public function doUpdate() {
-               wfRunHooks( 'LinksUpdate', array( &$this ) );
+               Hooks::run( 'LinksUpdate', array( &$this ) );
                $this->doIncrementalUpdate();
-               wfRunHooks( 'LinksUpdateComplete', array( &$this ) );
+               Hooks::run( 'LinksUpdateComplete', array( &$this ) );
        }
 
        protected function doIncrementalUpdate() {
-               wfProfileIn( __METHOD__ );
 
                # Page links
                $existing = $this->getExistingLinks();
@@ -227,7 +226,6 @@ class LinksUpdate extends SqlDataUpdate {
                        $this->queueRecursiveJobs();
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -251,7 +249,6 @@ class LinksUpdate extends SqlDataUpdate {
         * @param string $table Table to use (e.g. 'templatelinks')
         */
        public static function queueRecursiveJobsForTable( Title $title, $table ) {
-               wfProfileIn( __METHOD__ );
                if ( $title->getBacklinkCache()->hasLinks( $table ) ) {
                        $job = new RefreshLinksJob(
                                $title,
@@ -265,7 +262,6 @@ class LinksUpdate extends SqlDataUpdate {
                        JobQueueGroup::singleton()->push( $job );
                        JobQueueGroup::singleton()->deduplicateRootJob( $job );
                }
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -339,7 +335,7 @@ class LinksUpdate extends SqlDataUpdate {
                }
                if ( count( $insertions ) ) {
                        $this->mDb->insert( $table, $insertions, __METHOD__, 'IGNORE' );
-                       wfRunHooks( 'LinksUpdateAfterInsert', array( $this, $table, $insertions ) );
+                       Hooks::run( 'LinksUpdateAfterInsert', array( $this, $table, $insertions ) );
                }
        }