ApiComparePages: Don't error with no prev/next rev
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 22 Oct 2018 16:13:01 +0000 (12:13 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 22 Oct 2018 17:47:43 +0000 (13:47 -0400)
commitcf4f985f225f843acab6c3b56ce78cc12ffc2fc6
tree8c95ebdfdee7069b5f8682f514cfe13bcc80084f
parent093feda2c987b1039d91adc3858022bcbfad5a34
ApiComparePages: Don't error with no prev/next rev

Prior to I700edfa76, torelative=prev on the first revision of a page
would "diff" from an empty revision, and torelative=next on the latest
revision would diff to that same latest revision. People were depending
on that behavior, so restore it.

Bug: T203433
Change-Id: Ie81b58c196998a8047322740fe1d1fa44eff8526
includes/api/ApiComparePages.php
includes/api/i18n/en.json
includes/api/i18n/qqq.json
tests/phpunit/includes/api/ApiComparePagesTest.php