SpecialAllPages: Fix a few subtle "Previous page" link bugs
authorKevin Israel <pleasestand@live.com>
Sat, 10 Jan 2015 11:44:19 +0000 (06:44 -0500)
committerOri.livneh <ori@wikimedia.org>
Mon, 17 Aug 2015 07:20:15 +0000 (07:20 +0000)
commit770f54611725a7d298cf83e894e8e709da777b2c
tree183adf37afe2959c44935311c03f1df850062a77
parent3cf3e49c98c5bd1d3d638d3ad951137e7cccd1c6
SpecialAllPages: Fix a few subtle "Previous page" link bugs

* When finding the start of the previous page, exclude redirects if
  "Hide redirects" is checked. Otherwise, if some of the previous 345
  wiki pages were redirects, an equal number of results would be
  repeated when going back.
* Use the DB key form of the title (not the unprefixed text form)
  when building the query.
* Don't select unnecessary rows beyond the start of the previous page.
  At the same time, fix a bug that could cause results close to the
  beginning to be skipped when going back.
* When finding the start of the first page, don't omit ORDER BY for
  MySQL and SQLite.
* Don't suppress the link when the unprefixed title is "0" or similar
  or is numerically equal to the "from" parameter value.
* Suppress the link when the title would come after the "from"
  parameter value, not just when it would be equal to that value.

Change-Id: I2cc6958b894afa824a5345871b5a27b01f9fcc73
includes/specials/SpecialAllPages.php