Merge "Convert SiteStatsUpdate to using getMainStashInstance()"
[lhc/web/wiklou.git] / includes / parser / LinkHolderArray.php
index 5b6209e..41b5dec 100644 (file)
@@ -271,7 +271,6 @@ class LinkHolderArray {
                $this->replaceInternal( $text );
                $this->replaceInterwiki( $text );
 
-
        }
 
        /**
@@ -289,7 +288,6 @@ class LinkHolderArray {
                $linkCache = LinkCache::singleton();
                $output = $this->parent->getOutput();
 
-               wfProfileIn( __METHOD__ . '-check' );
                $dbr = wfGetDB( DB_SLAVE );
                $threshold = $this->parent->getOptions()->getStubThreshold();
 
@@ -366,16 +364,15 @@ class LinkHolderArray {
                                # The redirect status and length is passed to getLinkColour via the LinkCache
                                # Use formal parameters instead
                                $colours[$pdbk] = Linker::getLinkColour( $title, $threshold );
-                               //add id to the extension todolist
+                               // add id to the extension todolist
                                $linkcolour_ids[$s->page_id] = $pdbk;
                        }
                        unset( $res );
                }
                if ( count( $linkcolour_ids ) ) {
-                       //pass an array of page_ids to an extension
+                       // pass an array of page_ids to an extension
                        Hooks::run( 'GetLinkColours', array( $linkcolour_ids, &$colours ) );
                }
-               wfProfileOut( __METHOD__ . '-check' );
 
                # Do a second query for different language variants of links and categories
                if ( $wgContLang->hasVariants() ) {
@@ -383,7 +380,6 @@ class LinkHolderArray {
                }
 
                # Construct search and replace arrays
-               wfProfileIn( __METHOD__ . '-construct' );
                $replacePairs = array();
                foreach ( $this->internals as $ns => $entries ) {
                        foreach ( $entries as $index => $entry ) {
@@ -419,17 +415,14 @@ class LinkHolderArray {
                        }
                }
                $replacer = new HashtableReplacer( $replacePairs, 1 );
-               wfProfileOut( __METHOD__ . '-construct' );
 
                # Do the thing
-               wfProfileIn( __METHOD__ . '-replace' );
                $text = preg_replace_callback(
                        '/(<!--LINK .*?-->)/',
                        $replacer->cb(),
                        $text
                );
 
-               wfProfileOut( __METHOD__ . '-replace' );
        }
 
        /**
@@ -567,7 +560,6 @@ class LinkHolderArray {
 
                        // for each found variants, figure out link holders and replace
                        foreach ( $varRes as $s ) {
-
                                $variantTitle = Title::makeTitle( $s->page_namespace, $s->page_title );
                                $varPdbk = $variantTitle->getPrefixedDBkey();
                                $vardbk = $variantTitle->getDBkey();