Have Title::get(Next|Previous)RevisionID sort by timestamp
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 21 Apr 2017 18:14:11 +0000 (14:14 -0400)
committerTim Starling <tstarling@wikimedia.org>
Mon, 8 May 2017 05:33:07 +0000 (05:33 +0000)
commit6d5217180609cbe36b0a591f497212be3e8df22d
tree292992b8a40b857728e3610488ba2ead33ee4a7c
parent4a4021f2a6fd657d5832567d3af6d4d83fcfa1f1
Have Title::get(Next|Previous)RevisionID sort by timestamp

Revision IDs are usually increasing as timestamp increases, but not
always. Callers almost certainly want next/previous timestamp when the
two differ.

This also takes care of a minor bug in the nearby getFirstRevision()
where it'll choose an arbitrary tied revision ID if there were multiple
revisions made in the same second.

Bug: T4930
Bug: T163532
Bug: T159319
Change-Id: Iab2060a0ad5e45edbaa0ff36e863cb014b8e876f
includes/Title.php