aboutsummaryrefslogtreecommitdiffstats
path: root/includes/changes
diff options
context:
space:
mode:
authorAmir Sarabadani <ladsgroup@gmail.com>2024-02-12 20:39:24 +0100
committerAmir Sarabadani <ladsgroup@gmail.com>2024-02-12 21:23:38 +0100
commitea268ddcfdd4921f4ee1d91a60334263afac954c (patch)
treec7eebe3c27e2f11ba8fadb0abe627042924cb33d /includes/changes
parentda6b055c94d414009688cef1a6f435be8f1f5ede (diff)
downloadmediawikicore-ea268ddcfdd4921f4ee1d91a60334263afac954c.tar.gz
mediawikicore-ea268ddcfdd4921f4ee1d91a60334263afac954c.zip
Move away from wfGetDB() calls
If we are serious about getting rid of wfGetDB(), we should start replcing callers with proper replacement. These classes don't have any injection so it doesn't make sense to introduce it for this specific usecase. Bug: T330641 Change-Id: I645f67324d441288c63787c7e42390b59106c585
Diffstat (limited to 'includes/changes')
-rw-r--r--includes/changes/RecentChange.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php
index b0d722a9b333..b40fbfd510bc 100644
--- a/includes/changes/RecentChange.php
+++ b/includes/changes/RecentChange.php
@@ -1109,9 +1109,10 @@ class RecentChange implements Taggable {
// rc_deleted MUST be set
$this->mAttribs['rc_deleted'] = $row->rc_deleted;
+ $dbr = MediaWikiServices::getInstance()->getConnectionProvider()->getReplicaDatabase();
$comment = MediaWikiServices::getInstance()->getCommentStore()
// Legacy because $row may have come from self::selectFields()
- ->getCommentLegacy( wfGetDB( DB_REPLICA ), 'rc_comment', $row, true )
+ ->getCommentLegacy( $dbr, 'rc_comment', $row, true )
->text;
$this->mAttribs['rc_comment'] = &$comment;
$this->mAttribs['rc_comment_text'] = &$comment;