From f6d65e533c62f6deb21342d4901ece24497b433e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 4 Jun 2015 07:31:04 +0200 Subject: Update to MediaWiki 1.25.1 --- includes/parser/LinkHolderArray.php | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'includes/parser/LinkHolderArray.php') diff --git a/includes/parser/LinkHolderArray.php b/includes/parser/LinkHolderArray.php index 7794fae4..7026c5ce 100644 --- a/includes/parser/LinkHolderArray.php +++ b/includes/parser/LinkHolderArray.php @@ -229,7 +229,6 @@ class LinkHolderArray { * @return string */ public function makeHolder( $nt, $text = '', $query = array(), $trail = '', $prefix = '' ) { - wfProfileIn( __METHOD__ ); if ( !is_object( $nt ) ) { # Fail gracefully $retVal = "{$prefix}{$text}{$trail}"; @@ -259,7 +258,6 @@ class LinkHolderArray { } $this->size++; } - wfProfileOut( __METHOD__ ); return $retVal; } @@ -267,17 +265,12 @@ class LinkHolderArray { * Replace link placeholders with actual links, in the buffer * * @param string $text - * @return array Array of link CSS classes, indexed by PDBK. */ public function replace( &$text ) { - wfProfileIn( __METHOD__ ); - /** @todo FIXME: replaceInternal doesn't return a value */ - $colours = $this->replaceInternal( $text ); + $this->replaceInternal( $text ); $this->replaceInterwiki( $text ); - wfProfileOut( __METHOD__ ); - return $colours; } /** @@ -289,14 +282,12 @@ class LinkHolderArray { return; } - wfProfileIn( __METHOD__ ); global $wgContLang, $wgContentHandlerUseDB; $colours = array(); $linkCache = LinkCache::singleton(); $output = $this->parent->getOutput(); - wfProfileIn( __METHOD__ . '-check' ); $dbr = wfGetDB( DB_SLAVE ); $threshold = $this->parent->getOptions()->getStubThreshold(); @@ -380,9 +371,8 @@ class LinkHolderArray { } if ( count( $linkcolour_ids ) ) { //pass an array of page_ids to an extension - wfRunHooks( 'GetLinkColours', array( $linkcolour_ids, &$colours ) ); + 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() ) { @@ -390,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 ) { @@ -426,18 +415,14 @@ class LinkHolderArray { } } $replacer = new HashtableReplacer( $replacePairs, 1 ); - wfProfileOut( __METHOD__ . '-construct' ); # Do the thing - wfProfileIn( __METHOD__ . '-replace' ); $text = preg_replace_callback( '/()/', $replacer->cb(), $text ); - wfProfileOut( __METHOD__ . '-replace' ); - wfProfileOut( __METHOD__ ); } /** @@ -449,7 +434,6 @@ class LinkHolderArray { return; } - wfProfileIn( __METHOD__ ); # Make interwiki link HTML $output = $this->parent->getOutput(); $replacePairs = array(); @@ -463,7 +447,6 @@ class LinkHolderArray { '//', $replacer->cb(), $text ); - wfProfileOut( __METHOD__ ); } /** @@ -617,7 +600,7 @@ class LinkHolderArray { } } } - wfRunHooks( 'GetLinkColours', array( $linkcolour_ids, &$colours ) ); + Hooks::run( 'GetLinkColours', array( $linkcolour_ids, &$colours ) ); // rebuild the categories in original order (if there are replacements) if ( count( $varCategories ) > 0 ) { @@ -644,14 +627,12 @@ class LinkHolderArray { * @return string */ public function replaceText( $text ) { - wfProfileIn( __METHOD__ ); $text = preg_replace_callback( '//', array( &$this, 'replaceTextCallback' ), $text ); - wfProfileOut( __METHOD__ ); return $text; } -- cgit v1.2.3-54-g00ecf