From: Nik Everett Date: Tue, 29 Jul 2014 16:54:40 +0000 (-0400) Subject: Clean up search results if scrolled of the end X-Git-Tag: 1.31.0-rc.0~14685^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=c7879f5db21bfd4028e92264a4c3196592365c48;p=lhc%2Fweb%2Fwiklou.git Clean up search results if scrolled of the end If the user ends up off the end of the search results then show them a slightly more sane page: no more showing results 50 - 20 of 20. Bug: 68783 Change-Id: I29354e15873054278be18d74b2355b83b86f35f3 --- diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 1df674a55b..248a15af10 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -1091,7 +1091,7 @@ class SpecialSearch extends SpecialPage { ) . "\n"; // Results-info - if ( $totalNum > 0 ) { + if ( $totalNum > 0 && $this->offset < $totalNum ) { $top = $this->msg( 'showingresultsheader' ) ->numParams( $this->offset + 1, $this->offset + $resultsShown, $totalNum ) ->params( wfEscapeWikiText( $term ) )