Let Title accept READ_LATEST in $flags fields of methods
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 4 Jul 2019 21:23:54 +0000 (14:23 -0700)
committerKrinkle <krinklemail@gmail.com>
Thu, 5 Sep 2019 18:40:30 +0000 (18:40 +0000)
commit5cf7a6fccca33d20bef8864e9c3790f35e3fd0cd
treeffffac409c22ece126792915b285563cb07fb638
parent7e4375d61e46b8c4a77fcb9b635339c8b916d0b6
Let Title accept READ_LATEST in $flags fields of methods

This is meant as a more standard way of loading fields for update
queries than GAID_FOR_UPDATE. That later indirectly uses a singleton,
LinkCache, and pollutes it with DB master loaded values that affect
run-of-the-mill callers that only want DB_REPLICA data. Some of them
might *need* DB_REPLICA data depending on how they construct cache
keys. For example, including page_latest in a page key is broken if
the value is sometimes populated with DB master fields from a newer
page_latest.

Note that Title::loadRestrictions() is now forwaring $flags.
Also add some missing anotations to avoid IDEA warnings.

Change-Id: I6b21016d38f45f0b44fa1caed9ca9c63db2cee57
includes/Title.php