X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiQueryAllUsers.php;h=26844f3f26a16af4503ecfadaa49355b3c10c061;hp=0f0b2afaaa78e1212807bb5042360f8aab1ddd82;hb=ee56f00ddf0609082f8ae9a4dc3e6e1b6f54ddfd;hpb=bf9c2b0cb30cbe994f3a1859cf46224dd52039e1 diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index 0f0b2afaaa..26844f3f26 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 = CommentStore::getStore(); $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( 'ipb_reason', $row )->text; $data['blockexpiry'] = $row->ipb_expiry; } if ( $row->ipb_deleted ) {