From: Chad Horohoe Date: Wed, 6 Jul 2011 18:13:06 +0000 (+0000) Subject: Move wfShowingResultsNum() back into SpecialSearch where it belongs. No need for... X-Git-Tag: 1.31.0-rc.0~29033 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=46ef4b3961537e6e065116576dd2143c21c903d5;p=lhc%2Fweb%2Fwiklou.git Move wfShowingResultsNum() back into SpecialSearch where it belongs. No need for a global function for something thats only used once in core or extensions --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 6d917326a5..367be737d0 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1476,25 +1476,6 @@ function wfShowingResults( $offset, $limit ) { ); } -/** - * @todo document - * - * @param $offset Int - * @param $limit Int - * @param $num Int - * @return String - */ -function wfShowingResultsNum( $offset, $limit, $num ) { - global $wgLang; - return wfMsgExt( - 'showingresultsnum', - array( 'parseinline' ), - $wgLang->formatNum( $limit ), - $wgLang->formatNum( $offset + 1 ), - $wgLang->formatNum( $num ) - ); -} - /** * Generate (prev x| next x) (20|50|100...) type links for paging * diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 0534abfa96..2d1dba1ea8 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -986,7 +986,11 @@ class SpecialSearch extends SpecialPage { } elseif ( $resultsShown >= $this->limit ) { $top = wfShowingResults( $this->offset, $this->limit ); } else { - $top = wfShowingResultsNum( $this->offset, $this->limit, $resultsShown ); + $top = wfMsgExt( 'showingresultsnum', array( 'parseinline' ), + $wgLang->formatNum( $this->limit ), + $wgLang->formatNum( $this->offset + 1 ), + $wgLang->formatNum( $resultsShown ) + ); } $out .= Xml::tags( 'div', array( 'class' => 'results-info' ), Xml::tags( 'ul', null, Xml::tags( 'li', null, $top ) )