<?php
-
/**
- * Created on Jul 2, 2007
- *
* API for MediaWiki 1.8+
*
+ * Created on Jul 2, 2007
+ *
* Copyright © 2007 Roan Kattouw <Firstname>.<Lastname>@home.nl
*
* This program is free software; you can redistribute it and/or modify
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
*/
if ( !defined( 'MEDIAWIKI' ) ) {
$prop = array_flip( $params['prop'] );
$fld_revid = isset( $prop['revid'] );
$fld_user = isset( $prop['user'] );
+ $fld_userid = isset( $prop['userid'] );
$fld_comment = isset( $prop['comment'] );
$fld_parsedcomment = isset ( $prop['parsedcomment'] );
$fld_minor = isset( $prop['minor'] );
if ( $fld_user ) {
$this->addFields( 'ar_user_text' );
}
+ if ( $fld_userid ) {
+ $this->addFields( 'ar_user' );
+ }
if ( $fld_comment || $fld_parsedcomment ) {
$this->addFields( 'ar_comment' );
}
if ( $limit == 'max' ) {
$limit = $this->getMain()->canApiHighLimits() ? $botMax : $userMax;
- $this->getResult()->addValue( 'limits', $this->getModuleName(), $limit );
+ $this->getResult()->setParsedLimit( $this->getModuleName(), $limit );
}
$this->validateLimit( 'limit', $limit, 1, $userMax, $botMax );
if ( $fld_user ) {
$rev['user'] = $row->ar_user_text;
}
+ if ( $fld_userid ) {
+ $rev['userid'] = $row->ar_user;
+ }
if ( $fld_comment ) {
$rev['comment'] = $row->ar_comment;
}
ApiBase::PARAM_TYPE => array(
'revid',
'user',
+ 'userid',
'comment',
'parsedcomment',
'minor',
'limit' => 'The maximum amount of revisions to list',
'prop' => array(
'Which properties to get',
- ' revid - Adds the revision id of the deleted revision',
- ' user - Adds user who made the revision',
+ ' revid - Adds the revision ID of the deleted revision',
+ ' user - Adds the user who made the revision',
+ ' userid - Adds the user ID whom made the revision',
' comment - Adds the comment of the revision',
' parsedcomment - Adds the parsed comment of the revision',
' minor - Tags if the revision is minor',
'List the first 50 deleted revisions in the main namespace (mode 3):',
' api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50',
'List the first 50 deleted pages in the Talk namespace (mode 3):',
- ' api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50&drnamespace=1&drunique',
+ ' api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50&drnamespace=1&drunique=',
);
}