mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Avoid master queries on page views in loadFilterData()
Bug: T92357 Change-Id: Ib7928067bc0b7ebd631d8abc96e3c24f81e78414
This commit is contained in:
parent
71bb512d93
commit
f7367dc970
|
@ -823,7 +823,9 @@ class AbuseFilterViewEdit extends AbuseFilterView {
|
|||
}
|
||||
|
||||
// Load from master to avoid unintended reversions where there's replication lag.
|
||||
$dbr = wfGetDB( DB_MASTER );
|
||||
$dbr = $this->getRequest()->wasPosted()
|
||||
? wfGetDB( DB_MASTER )
|
||||
: wfGetDB( DB_SLAVE );
|
||||
|
||||
// Load certain fields only. This prevents a condition seen on Wikimedia where
|
||||
// a schema change adding a new field caused that extra field to be selected.
|
||||
|
|
Loading…
Reference in a new issue