<?php
-
/**
- * Created on Sep 10, 2007
*
- * API for MediaWiki 1.8+
*
- * Copyright © 2007 Roan Kattouw <Firstname>.<Lastname>@home.nl
+ * Created on Sep 10, 2007
+ *
+ * Copyright © 2007 Roan Kattouw <Firstname>.<Lastname>@gmail.com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* 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' ) ) {
$fld_flags = isset( $prop['flags'] );
$result = $this->getResult();
- $pageSet = $this->getPageSet();
- $titles = $pageSet->getTitles();
- $data = array();
$this->addTables( 'ipblocks' );
$this->addFields( 'ipb_auto' );
'ipb_auto' => 0
) );
}
+
if ( !$wgUser->isAllowed( 'hideuser' ) ) {
$this->addWhereFld( 'ipb_deleted', 0 );
}
$res = $this->select( __METHOD__ );
$count = 0;
- while ( $row = $res->fetchObject() ) {
+ foreach ( $res as $row ) {
if ( ++$count > $params['limit'] ) {
// We've had enough
$this->setContinueEnumParameter( 'start', wfTimestamp( TS_ISO_8601, $row->ipb_timestamp ) );
'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' ),
'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 getVersion() {
return __CLASS__ . ': $Id$';
}
-}
\ No newline at end of file
+}