From c7879f5db21bfd4028e92264a4c3196592365c48 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Tue, 29 Jul 2014 12:54:40 -0400 Subject: [PATCH] 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 --- includes/specials/SpecialSearch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) ) -- 2.20.1