- public function loadRestrictionsFromRows( $rows, $oldFashionedRestrictions = null ) {
- $dbr = wfGetDB( DB_REPLICA );
+ public function loadRestrictionsFromRows(
+ $rows, $oldFashionedRestrictions = null, $readLatest = false
+ ) {
+ $whichDb = $readLatest ? DB_MASTER : DB_REPLICA;
+ $dbr = wfGetDB( $whichDb );