From: apexkid Date: Tue, 4 Feb 2014 21:27:16 +0000 (+0000) Subject: Show range start and end in special page pagination X-Git-Tag: 1.31.0-rc.0~17005 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=e65fd1bef5a4996029495db817e8a86867409f7e;p=lhc%2Fweb%2Fwiklou.git Show range start and end in special page pagination Changes pagination message from "starting with #X" to "in range #X to #Y" for special pages such as Special:MostLinkedCategories Bug: 11269 Change-Id: Ibf9191f3a694014ad02eba9a58c600833e8361ec --- diff --git a/includes/QueryPage.php b/includes/QueryPage.php index 7c2f8f7779..bb6a0c3ef0 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -543,9 +543,9 @@ abstract class QueryPage extends SpecialPage { if ( $this->shownavigation ) { $out->addHTML( $this->getPageHeader() ); if ( $this->numRows > 0 ) { - $out->addHTML( $this->msg( 'showingresults' )->numParams( + $out->addHTML( $this->msg( 'showingresultsinrange' )->numParams( min( $this->numRows, $this->limit ), # do not show the one extra row, if exist - $this->offset + 1 )->parseAsBlock() ); + $this->offset + 1, (min( $this->numRows, $this->limit ) + $this->offset) )->parseAsBlock() ); # Disable the "next" link when we reach the end $paging = $this->getLanguage()->viewPrevNext( $this->getPageTitle( $par ), $this->offset, $this->limit, $this->linkParameters(), ( $this->numRows <= $this->limit ) ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index fa0a354e8d..497d2e78aa 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1855,6 +1855,7 @@ Details can be found in the [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENA 'searchrelated' => 'related', 'searchall' => 'all', 'showingresults' => "Showing below up to {{PLURAL:$1|1 result|$1 results}} starting with #$2.", +'showingresultsinrange' => "Showing below up to {{PLURAL:$1|1 result|$1 results}} in range #$2 to #$3.", 'showingresultsnum' => "Showing below {{PLURAL:$3|1 result|$3 results}} starting with #$2.", 'showingresultsheader' => "{{PLURAL:$5|Result $1 of $3|Results $1 - $2 of $3}} for $4", 'search-nonefound' => 'There were no results matching the query.', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index dedf6f1ca9..901cc2c27e 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -2992,6 +2992,10 @@ See also: * $3 - total number of results * $4 - the search term * $5 - number of results', +'showingresultsinrange' => 'Used in pagination of [[Special:MostLinkedCategories]]. Parameters: +* $1 - the total number of results in the batch shown +* $2 - the number of the first item listed +* $3 - the number of last item in the batch shown', 'search-nonefound' => 'Message shown when a search returned no results (when using the default MediaWiki search engine).', 'powersearch-legend' => 'Advanced search diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index f9eb6754d0..ed85223c37 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -991,6 +991,7 @@ $wgMessageStructure = array( 'searchrelated', 'searchall', 'showingresults', + 'showingresultsinrange', 'showingresultsnum', 'showingresultsheader', 'search-nonefound',