X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryBlocks.php;h=9661f32bef76e402bdb1cbed9381fe476d89cd7e;hb=68b89f0b6bd9f048791df32232f85d45b80fedc6;hp=7ec8cbe97045c44d9d30f44727bd863592055b61;hpb=7fa78fefa902e7e8f30267d98fcd99d25b473542;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index 7ec8cbe970..9661f32bef 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -1,10 +1,9 @@ .@home.nl * * This program is free software; you can redistribute it and/or modify @@ -19,8 +18,10 @@ * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html + * + * @file */ if ( !defined( 'MEDIAWIKI' ) ) { @@ -60,9 +61,6 @@ class ApiQueryBlocks extends ApiQueryBase { $fld_flags = isset( $prop['flags'] ); $result = $this->getResult(); - $pageSet = $this->getPageSet(); - $titles = $pageSet->getTitles(); - $data = array(); $this->addTables( 'ipblocks' ); $this->addFields( 'ipb_auto' ); @@ -127,6 +125,7 @@ class ApiQueryBlocks extends ApiQueryBase { 'ipb_auto' => 0 ) ); } + if ( !$wgUser->isAllowed( 'hideuser' ) ) { $this->addWhereFld( 'ipb_deleted', 0 ); } @@ -269,14 +268,24 @@ class ApiQueryBlocks extends ApiQueryBase { 'ids' => 'Pipe-separated list of block IDs to list (optional)', 'users' => 'Pipe-separated list of users to search for (optional)', 'ip' => array( 'Get all blocks applying to this IP or CIDR range, including range blocks.', - 'Cannot be used together with bkusers. CIDR ranges broader than /16 are not accepted.' ), + 'Cannot be used together with bkusers. CIDR ranges broader than /16 are not accepted' ), 'limit' => 'The maximum amount of blocks to list', - 'prop' => 'Which properties to get', + 'prop' => array( + 'Which properties to get', + ' id - Adds the id of the block', + ' user - Adds the username of the blocked user', + ' by - Adds the username of the blocking admin', + ' timestamp - Adds the timestamp of when the block was given', + ' expiry - Adds the timestamp of when the block expires', + ' reason - Adds the reason given for the block', + ' range - Adds the range of IPs affected by the block', + ' flags - Tags the ban with (autoblock, anononly, etc)', + ), ); } public function getDescription() { - return 'List all blocked users and IP addresses.'; + return 'List all blocked users and IP addresses'; } public function getPossibleErrors() { @@ -298,4 +307,4 @@ class ApiQueryBlocks extends ApiQueryBase { public function getVersion() { return __CLASS__ . ': $Id$'; } -} \ No newline at end of file +}