From c59a60aeccf095675262739e07b7d1c34f8185e9 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 21 Mar 2014 10:13:28 -0700 Subject: [PATCH] Swap wfProfileIn/Out calls for ProfileSection Change-Id: Iece1532241dda4297dd4ca2c93287c13462eb2e9 --- includes/specials/SpecialSearch.php | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index ffe88f7aec..aa38e6cd63 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -214,8 +214,8 @@ class SpecialSearch extends SpecialPage { */ public function showResults( $term ) { global $wgDisableTextSearch, $wgSearchForwardUrl, $wgContLang, $wgScript; - wfProfileIn( __METHOD__ ); + $profile = new ProfileSection( __METHOD__ ); $search = $this->getSearchEngine(); $search->setLimitOffset( $this->limit, $this->offset ); $search->setNamespaces( $this->namespaces ); @@ -247,7 +247,6 @@ class SpecialSearch extends SpecialPage { Xml::closeElement( 'fieldset' ) ); } - wfProfileOut( __METHOD__ ); return; } @@ -303,7 +302,6 @@ class SpecialSearch extends SpecialPage { if ( !wfRunHooks( 'SpecialSearchResultsPrepend', array( $this, $out, $term ) ) ) { # Hook requested termination - wfProfileOut( __METHOD__ ); return; } @@ -330,7 +328,6 @@ class SpecialSearch extends SpecialPage { // Sometimes the search engine knows there are too many hits if ( $titleMatches instanceof SearchResultTooMany ) { $out->wrapWikiMsg( "==$1==\n", 'toomanymatches' ); - wfProfileOut( __METHOD__ ); return; } @@ -340,7 +337,6 @@ class SpecialSearch extends SpecialPage { $out->addHtml( $this->getProfileForm( $this->profile, $term ) ); $out->addHTML( '' ); // Empty query -- straight view of search form - wfProfileOut( __METHOD__ ); return; } @@ -430,7 +426,6 @@ class SpecialSearch extends SpecialPage { $out->addHTML( "

{$prevnext}

\n" ); } wfRunHooks( 'SpecialSearchResultsAppend', array( $this, $out, $term ) ); - wfProfileOut( __METHOD__ ); } /** @@ -534,8 +529,8 @@ class SpecialSearch extends SpecialPage { */ protected function showMatches( &$matches ) { global $wgContLang; - wfProfileIn( __METHOD__ ); + $profile = new ProfileSection( __METHOD__ ); $terms = $wgContLang->convertForSearchResult( $matches->termMatches() ); $out = "