SpecialSearch: Fix pagination
authorChad Horohoe <chadh@wikimedia.org>
Tue, 1 Jul 2014 19:28:53 +0000 (12:28 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Tue, 1 Jul 2014 19:38:22 +0000 (12:38 -0700)
commit82afee57ef9a8ab68b56f494c174069e4af0ba29
tree7be8ebe73715948e71d4672c1291933f8e3386bc
parent1da24f74e9b0a94dc78ca04630fc0cc43b316184
SpecialSearch: Fix pagination

This basically reverts f4357b6 but fixes it while we're here. Requesting
one extra result causes extra load and weird queries against the search
backend...all to be thrown away. Plus it's showing "Results 1-21 of N"
when we're only showing 20 which is a regression.

All search backends implement getTotalHits() so use that count instead
to figure out if we're on the last page.

Change-Id: Ib38b1e124bea7133f48209ef8af1b1e26b4dba75
includes/specials/SpecialSearch.php