[MCR] Don't require $title to be passed to Revision::newFromId
authoraddshore <addshorewiki@gmail.com>
Fri, 22 Dec 2017 17:32:54 +0000 (17:32 +0000)
committeraddshore <addshorewiki@gmail.com>
Sat, 23 Dec 2017 10:54:17 +0000 (10:54 +0000)
commit56b7ba03a286c0997752fb61b14662347ea0e9de
treef979b9be8df9470d4e672a7fd7667a2001aac75b
parente85046bb4a37f8c06464c2dfa50fd474695d3ae3
[MCR] Don't require $title to be passed to Revision::newFromId

If the title is not passed in as a param (already known) then select
it in Revision::newFromId instead of waiting for it to be selected
further down the tree.
This means that we can use the same Title object to pass into the
RevisionRecord as well as our legacy Revision object.

The selection chooses either a slave or master depending on
recent writes.

This logic used to be in Revision::getTitle and also in
Revision::newFromConds which was called by newFromId

Bug: T183505
Change-Id: I9cf4ce2c3c86d6bf979a3c88eb423b942b9a1ba4
includes/Revision.php