Don't require Title for getTimestampFromId
authorAryeh Gregor <ayg@aryeh.name>
Mon, 29 Apr 2019 14:32:22 +0000 (17:32 +0300)
committerAryeh Gregor <ayg@aryeh.name>
Sun, 5 May 2019 11:35:53 +0000 (14:35 +0300)
commit908e46028aeac08379da82648e4d4a7198445c76
treec892a4a82bb064286389a4012bb0b0885428b187
parentf7201e3b9b8117582bdd29c52b0a8c637650fbc9
Don't require Title for getTimestampFromId

3e36ba655e3a added an option for passing a page ID to this method of
Revision, and e03787afd91c switched it to a Title and made it mandatory.
This behavior propagated to the method in RevisionStore.  As far as I
can tell, the parameter does not help anything, but it can add a
database query to get the page ID if it's not cached, and impedes
conversion to LinkTarget. I can't figure out any reason to not
completely drop it. I've noted it as deprecated but still supported it
for now for compatibility -- I found one extension that does pass it.
(It's ignored, though, which theoretically would be a behavior change if
someone was passing a Title that didn't match the revision ID.)

While I was at it, I added the method to RevisionLookup, although it's
only used in later patches. Properly I should move that piece to a later
patch, but it didn't seem worth the effort.

I didn't change the Revision method, because the whole Revision class is
deprecated anyway.

Change-Id: I26ef5f2bf828f0f450633b7237d26d888e2c8773
RELEASE-NOTES-1.34
includes/Revision.php
includes/Revision/RevisionLookup.php
includes/Revision/RevisionStore.php
includes/api/ApiSetNotificationTimestamp.php
tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php