Fully utilize LinkTarget passed to getRevisionByTitle
authorJason Linehan <jlinehan@wikimedia.org>
Thu, 15 Nov 2018 16:02:32 +0000 (11:02 -0500)
committerKrinkle <krinklemail@gmail.com>
Tue, 2 Apr 2019 21:25:45 +0000 (21:25 +0000)
commitaed6be47ac2764c1cebce39bd1c771808fa23a06
tree0e258ff8099843c0bb74dbfd718c14ea751d9366
parent29129160af3a80e1f95edaab72215edc45ad3019
Fully utilize LinkTarget passed to getRevisionByTitle

Failure of getRevisionByTitle to pass its LinkTarget argument
to newRevisionFromRow resulted in a needless second instantiation
of the Title (an extra query).

Because newRevisionFromRow needs a Title, not just a LinkTarget,
it is unfortunately necessary to call Title::newFromLinkTarget
on it for now -- however this does not involve a DB lookup and
is on track to be fixed with revisions to the Title class.

Bug: T206498
Change-Id: Ic6f98d8fbf66d85121668571c17e148efc5ec2be
includes/Revision/RevisionStore.php
tests/phpunit/includes/api/ApiMoveTest.php