aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/addRFCandPMIDInterwiki.php
diff options
context:
space:
mode:
authorAmir Sarabadani <ladsgroup@gmail.com>2024-01-17 19:53:40 +0100
committerAmir Sarabadani <ladsgroup@gmail.com>2024-01-18 15:12:04 +0100
commitd9370003fb801c22cc6ab9f09f15c26e11ca19cd (patch)
treeffe9fe826343d3aba15f321bffc4f9809f0a51cb /maintenance/addRFCandPMIDInterwiki.php
parent6d71df9dcb0fb043db9942819e2f5883cec97c0e (diff)
downloadmediawikicore-d9370003fb801c22cc6ab9f09f15c26e11ca19cd.tar.gz
mediawikicore-d9370003fb801c22cc6ab9f09f15c26e11ca19cd.zip
maintenance: Introduce getReplicaDB() and getPrimaryDB()
And start using them instead of wfGetDB(), LB/LBF connection methods or worse, $this->getDB(). $this->getDB() reuses the database object regardless of whether you're calling a replica or primary, leading to returning a replica on a primary and other way around. Bug: T330641 Change-Id: I9e2cf85ca277022284fc26b9f37db57bd12aaa81
Diffstat (limited to 'maintenance/addRFCandPMIDInterwiki.php')
-rw-r--r--maintenance/addRFCandPMIDInterwiki.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/maintenance/addRFCandPMIDInterwiki.php b/maintenance/addRFCandPMIDInterwiki.php
index d64dcddb3474..698ec5cd6b28 100644
--- a/maintenance/addRFCandPMIDInterwiki.php
+++ b/maintenance/addRFCandPMIDInterwiki.php
@@ -50,7 +50,7 @@ class AddRFCandPMIDInterwiki extends LoggedUpdateMaintenance {
if ( $interwikiCache !== false ) {
return true;
}
- $dbw = $this->getDB( DB_PRIMARY );
+ $dbw = $this->getPrimaryDB();
$rfc = $dbw->newSelectQueryBuilder()
->select( 'iw_url' )