X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryAllUsers.php;h=65a4b321278147c88e0be0698faf5ff4db52fa94;hb=4eff5204d9ec6eb09df70d2fe017a2146cfa4238;hp=0f0b2afaaa78e1212807bb5042360f8aab1ddd82;hpb=ca55cfd87d2efc41b6ab208d60d1cde61f0ac9c0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index 0f0b2afaaa..65a4b32127 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -1,9 +1,5 @@ @gmail.com" * * This program is free software; you can redistribute it and/or modify @@ -49,6 +45,7 @@ class ApiQueryAllUsers extends ApiQueryBase { $activeUserDays = $this->getConfig()->get( 'ActiveUserDays' ); $db = $this->getDB(); + $commentStore = new CommentStore( 'ipb_reason' ); $prop = $params['prop']; if ( !is_null( $prop ) ) { @@ -122,9 +119,7 @@ class ApiQueryAllUsers extends ApiQueryBase { [ 'ug1.ug_user=user_id', 'ug1.ug_group' => $params['group'], - $this->getConfig()->get( 'DisableUserGroupExpiry' ) ? - '1' : - 'ug1.ug_expiry IS NULL OR ug1.ug_expiry >= ' . $db->addQuotes( $db->timestamp() ) + 'ug1.ug_expiry IS NULL OR ug1.ug_expiry >= ' . $db->addQuotes( $db->timestamp() ) ] ] ] ); @@ -147,9 +142,7 @@ class ApiQueryAllUsers extends ApiQueryBase { $this->addJoinConds( [ 'ug1' => [ 'LEFT OUTER JOIN', array_merge( [ 'ug1.ug_user=user_id', - $this->getConfig()->get( 'DisableUserGroupExpiry' ) ? - '1' : - 'ug1.ug_expiry IS NULL OR ug1.ug_expiry >= ' . $db->addQuotes( $db->timestamp() ) + 'ug1.ug_expiry IS NULL OR ug1.ug_expiry >= ' . $db->addQuotes( $db->timestamp() ) ], $exclude ) ] ] ); $this->addWhere( 'ug1.ug_user IS NULL' ); @@ -165,9 +158,7 @@ class ApiQueryAllUsers extends ApiQueryBase { $this->addFields( [ 'groups' => $db->buildGroupConcatField( '|', 'user_groups', 'ug_group', [ 'ug_user=user_id', - $this->getConfig()->get( 'DisableUserGroupExpiry' ) ? - '1' : - 'ug_expiry IS NULL OR ug_expiry >= ' . $db->addQuotes( $db->timestamp() ) + 'ug_expiry IS NULL OR ug_expiry >= ' . $db->addQuotes( $db->timestamp() ) ] ) ] ); } @@ -269,7 +260,7 @@ class ApiQueryAllUsers extends ApiQueryBase { $data['blockedby'] = $row->ipb_by_text; $data['blockedbyid'] = (int)$row->ipb_by; $data['blockedtimestamp'] = wfTimestamp( TS_ISO_8601, $row->ipb_timestamp ); - $data['blockreason'] = $row->ipb_reason; + $data['blockreason'] = $commentStore->getComment( $row )->text; $data['blockexpiry'] = $row->ipb_expiry; } if ( $row->ipb_deleted ) {