public function execute() {
$db = $this->getDB();
+ $commentStore = new CommentStore( 'ipb_reason' );
$params = $this->extractRequestParams();
$this->requireMaxOneParameter( $params, 'userids', 'users' );
}
foreach ( $res as $row ) {
-
// create user object and pass along $userGroups if set
// that reduces the number of database queries needed in User dramatically
if ( !isset( $userGroups ) ) {
$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'] = $row->ipb_reason;
+ $data[$key]['blockreason'] = $commentStore->getComment( $row )->text;
$data[$key]['blockexpiry'] = $row->ipb_expiry;
}