From 46ef4b3961537e6e065116576dd2143c21c903d5 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 6 Jul 2011 18:13:06 +0000 Subject: [PATCH] Move wfShowingResultsNum() back into SpecialSearch where it belongs. No need for a global function for something thats only used once in core or extensions --- includes/GlobalFunctions.php | 19 ------------------- includes/specials/SpecialSearch.php | 6 +++++- 2 files changed, 5 insertions(+), 20 deletions(-) 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 ) ) -- 2.20.1