aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiQueryLogEvents.php
diff options
context:
space:
mode:
authorDannyS712 <dannys712.wiki@gmail.com>2021-04-23 14:51:18 +0000
committerDannyS712 <dannys712.wiki@gmail.com>2021-04-23 15:09:48 +0000
commit523342c7811840e91fc0be660cc232a4d91c8bff (patch)
treed35ccc6a975adf5f135d2d10a0fe79ea3589b3f6 /includes/api/ApiQueryLogEvents.php
parent89b00fcfbe966092f405f0cc939eb6f052cf2a2b (diff)
downloadmediawikicore-523342c7811840e91fc0be660cc232a4d91c8bff.tar.gz
mediawikicore-523342c7811840e91fc0be660cc232a4d91c8bff.zip
Inject CommentStore service into api query modules
- ApiQueryBlocks - ApiQueryDeletedrevs - ApiQueryFilearchive - ApiQueryLogEvents - ApiQueryProtectedTitles - ApiQueryRecentChanges - ApiQueryUserContribs - ApiQueryWatchlist Bug: T259960 Change-Id: Ib7ee815fcea3e72523124eb6a2eaf20ad9565cfe
Diffstat (limited to 'includes/api/ApiQueryLogEvents.php')
-rw-r--r--includes/api/ApiQueryLogEvents.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php
index 228d008e8221..79419af15a87 100644
--- a/includes/api/ApiQueryLogEvents.php
+++ b/includes/api/ApiQueryLogEvents.php
@@ -34,8 +34,18 @@ class ApiQueryLogEvents extends ApiQueryBase {
/** @var CommentStore */
private $commentStore;
- public function __construct( ApiQuery $query, $moduleName ) {
+ /**
+ * @param ApiQuery $query
+ * @param string $moduleName
+ * @param CommentStore $commentStore
+ */
+ public function __construct(
+ ApiQuery $query,
+ $moduleName,
+ CommentStore $commentStore
+ ) {
parent::__construct( $query, $moduleName, 'le' );
+ $this->commentStore = $commentStore;
}
private $fld_ids = false, $fld_title = false, $fld_type = false,
@@ -46,7 +56,6 @@ class ApiQueryLogEvents extends ApiQueryBase {
public function execute() {
$params = $this->extractRequestParams();
$db = $this->getDB();
- $this->commentStore = CommentStore::getStore();
$this->requireMaxOneParameter( $params, 'title', 'prefix', 'namespace' );
$prop = array_flip( $params['prop'] );