(bug 47950) Fix IndexPager detection of "is first" state
authorBrad Jorsch <bjorsch@wikimedia.org>
Wed, 1 May 2013 21:04:02 +0000 (17:04 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Wed, 1 May 2013 21:09:17 +0000 (17:09 -0400)
commit75a923386853270836c9e7205d6ccf1f9b37cb95
treec0b2b9e260b938a2d4478394ad60c8b7e7e7b5e0
parent84ccbeb1ec81fbdd3316c3dc2f13eae9aeff602c
(bug 47950) Fix IndexPager detection of "is first" state

IndexPager currently assumes that if an offset is supplied, then it is
not at the first entry. This is trivially false in many cases, e.g. if
the offset is an older-than date and that date is in the future.

The only way to really determine whether we're at the first entry when
an offset is supplied is to query for 1 row in the opposite direction.
This patch does just that.

Bug: 47950
Change-Id: I05fec226abb609b78a62f2a23f35d5b52a48ab1a
includes/Pager.php