X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiQueryUsers.php;h=824c4d5223105fbc93ba15778d7ad5605f433064;hp=6de512b878594853c9a262d79a2c407091de426d;hb=faf7cc4a09848c538320bd2b9067b1a77c0a0183;hpb=fdb07d74e63ed3f0c09e548ae43b23b147bb54e6 diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php index 6de512b878..824c4d5223 100644 --- a/includes/api/ApiQueryUsers.php +++ b/includes/api/ApiQueryUsers.php @@ -95,7 +95,7 @@ class ApiQueryUsers extends ApiQueryBase { public function execute() { $db = $this->getDB(); - $commentStore = new CommentStore( 'ipb_reason' ); + $commentStore = CommentStore::getStore(); $params = $this->extractRequestParams(); $this->requireMaxOneParameter( $params, 'userids', 'users' ); @@ -235,7 +235,8 @@ class ApiQueryUsers extends ApiQueryBase { $data[$key]['blockedby'] = $row->ipb_by_text; $data[$key]['blockedbyid'] = (int)$row->ipb_by; $data[$key]['blockedtimestamp'] = wfTimestamp( TS_ISO_8601, $row->ipb_timestamp ); - $data[$key]['blockreason'] = $commentStore->getComment( $row )->text; + $data[$key]['blockreason'] = $commentStore->getComment( 'ipb_reason', $row ) + ->text; $data[$key]['blockexpiry'] = $row->ipb_expiry; }