X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiQueryUsers.php;h=fbf1f9ebfb999fd1d560d63630c43bde0f45e6b8;hp=5b094cd9084a8c7087a84b6af05fb86b78b78248;hb=d19826aa35b206847a568a4b2c1c9ffaa615fca5;hpb=01c3bf3431e9754b79e4a4a31fa74ce9e6616514 diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php index 5b094cd908..fbf1f9ebfb 100644 --- a/includes/api/ApiQueryUsers.php +++ b/includes/api/ApiQueryUsers.php @@ -99,6 +99,7 @@ class ApiQueryUsers extends ApiQueryBase { public function execute() { $db = $this->getDB(); + $commentStore = new CommentStore( 'ipb_reason' ); $params = $this->extractRequestParams(); $this->requireMaxOneParameter( $params, 'userids', 'users' ); @@ -182,7 +183,6 @@ class ApiQueryUsers extends ApiQueryBase { } 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 ) ) { @@ -237,7 +237,7 @@ 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'] = $row->ipb_reason; + $data[$key]['blockreason'] = $commentStore->getComment( $row )->text; $data[$key]['blockexpiry'] = $row->ipb_expiry; }