5 * Created on Oct 19, 2006
7 * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * http://www.gnu.org/copyleft/gpl.html
28 * A query action to enumerate the recent changes that were done to the wiki.
29 * Various filters are supported.
33 class ApiQueryRecentChanges
extends ApiQueryGeneratorBase
{
35 public function __construct( $query, $moduleName ) {
36 parent
::__construct( $query, $moduleName, 'rc' );
39 private $fld_comment = false, $fld_parsedcomment = false, $fld_user = false, $fld_userid = false,
40 $fld_flags = false, $fld_timestamp = false, $fld_title = false, $fld_ids = false,
41 $fld_sizes = false, $fld_redirect = false, $fld_patrolled = false, $fld_loginfo = false,
42 $fld_tags = false, $fld_sha1 = false, $token = array();
44 private $tokenFunctions;
47 * Get an array mapping token names to their handler functions.
48 * The prototype for a token function is func($pageid, $title, $rc)
49 * it should return a token or false (permission denied)
50 * @return array array(tokenname => function)
52 protected function getTokenFunctions() {
53 // Don't call the hooks twice
54 if ( isset( $this->tokenFunctions
) ) {
55 return $this->tokenFunctions
;
58 // If we're in JSON callback mode, no tokens can be obtained
59 if ( !is_null( $this->getMain()->getRequest()->getVal( 'callback' ) ) ) {
63 $this->tokenFunctions
= array(
64 'patrol' => array( 'ApiQueryRecentChanges', 'getPatrolToken' )
66 wfRunHooks( 'APIQueryRecentChangesTokens', array( &$this->tokenFunctions
) );
68 return $this->tokenFunctions
;
74 * @param $rc RecentChange (optional)
77 public static function getPatrolToken( $pageid, $title, $rc = null ) {
80 $validTokenUser = false;
83 if ( ( $wgUser->useRCPatrol() && $rc->getAttribute( 'rc_type' ) == RC_EDIT
) ||
84 ( $wgUser->useNPPatrol() && $rc->getAttribute( 'rc_type' ) == RC_NEW
)
86 $validTokenUser = true;
88 } elseif ( $wgUser->useRCPatrol() ||
$wgUser->useNPPatrol() ) {
89 $validTokenUser = true;
92 if ( $validTokenUser ) {
93 // The patrol token is always the same, let's exploit that
94 static $cachedPatrolToken = null;
96 if ( is_null( $cachedPatrolToken ) ) {
97 $cachedPatrolToken = $wgUser->getEditToken( 'patrol' );
100 return $cachedPatrolToken;
107 * Sets internal state to include the desired properties in the output.
108 * @param array $prop associative array of properties, only keys are used here
110 public function initProperties( $prop ) {
111 $this->fld_comment
= isset( $prop['comment'] );
112 $this->fld_parsedcomment
= isset( $prop['parsedcomment'] );
113 $this->fld_user
= isset( $prop['user'] );
114 $this->fld_userid
= isset( $prop['userid'] );
115 $this->fld_flags
= isset( $prop['flags'] );
116 $this->fld_timestamp
= isset( $prop['timestamp'] );
117 $this->fld_title
= isset( $prop['title'] );
118 $this->fld_ids
= isset( $prop['ids'] );
119 $this->fld_sizes
= isset( $prop['sizes'] );
120 $this->fld_redirect
= isset( $prop['redirect'] );
121 $this->fld_patrolled
= isset( $prop['patrolled'] );
122 $this->fld_loginfo
= isset( $prop['loginfo'] );
123 $this->fld_tags
= isset( $prop['tags'] );
124 $this->fld_sha1
= isset( $prop['sha1'] );
127 public function execute() {
131 public function executeGenerator( $resultPageSet ) {
132 $this->run( $resultPageSet );
136 * Generates and outputs the result of this query based upon the provided parameters.
138 * @param $resultPageSet ApiPageSet
140 public function run( $resultPageSet = null ) {
141 $user = $this->getUser();
142 /* Get the parameters of the request. */
143 $params = $this->extractRequestParams();
145 /* Build our basic query. Namely, something along the lines of:
146 * SELECT * FROM recentchanges WHERE rc_timestamp > $start
147 * AND rc_timestamp < $end AND rc_namespace = $namespace
150 $this->addTables( 'recentchanges' );
151 $index = array( 'recentchanges' => 'rc_timestamp' ); // May change
152 $this->addTimestampWhereRange( 'rc_timestamp', $params['dir'], $params['start'], $params['end'] );
154 if ( !is_null( $params['continue'] ) ) {
155 $cont = explode( '|', $params['continue'] );
156 if ( count( $cont ) != 2 ) {
157 $this->dieUsage( 'Invalid continue param. You should pass the ' .
158 'original value returned by the previous query', '_badcontinue' );
161 $timestamp = $this->getDB()->addQuotes( wfTimestamp( TS_MW
, $cont[0] ) );
162 $id = intval( $cont[1] );
163 $op = $params['dir'] === 'older' ?
'<' : '>';
166 "rc_timestamp $op $timestamp OR " .
167 "(rc_timestamp = $timestamp AND " .
172 $order = $params['dir'] === 'older' ?
'DESC' : 'ASC';
173 $this->addOption( 'ORDER BY', array(
174 "rc_timestamp $order",
178 $this->addWhereFld( 'rc_namespace', $params['namespace'] );
179 $this->addWhereFld( 'rc_deleted', 0 );
181 if ( !is_null( $params['type'] ) ) {
182 $this->addWhereFld( 'rc_type', $this->parseRCType( $params['type'] ) );
185 if ( !is_null( $params['show'] ) ) {
186 $show = array_flip( $params['show'] );
188 /* Check for conflicting parameters. */
189 if ( ( isset( $show['minor'] ) && isset( $show['!minor'] ) )
190 ||
( isset( $show['bot'] ) && isset( $show['!bot'] ) )
191 ||
( isset( $show['anon'] ) && isset( $show['!anon'] ) )
192 ||
( isset( $show['redirect'] ) && isset( $show['!redirect'] ) )
193 ||
( isset( $show['patrolled'] ) && isset( $show['!patrolled'] ) )
194 ||
( isset( $show['patrolled'] ) && isset( $show['unpatrolled'] ) )
195 ||
( isset( $show['!patrolled'] ) && isset( $show['unpatrolled'] ) )
197 $this->dieUsageMsg( 'show' );
201 if ( isset( $show['patrolled'] )
202 ||
isset( $show['!patrolled'] )
203 ||
isset( $show['unpatrolled'] )
205 if ( !$user->useRCPatrol() && !$user->useNPPatrol() ) {
207 'You need the patrol right to request the patrolled flag',
213 /* Add additional conditions to query depending upon parameters. */
214 $this->addWhereIf( 'rc_minor = 0', isset( $show['!minor'] ) );
215 $this->addWhereIf( 'rc_minor != 0', isset( $show['minor'] ) );
216 $this->addWhereIf( 'rc_bot = 0', isset( $show['!bot'] ) );
217 $this->addWhereIf( 'rc_bot != 0', isset( $show['bot'] ) );
218 $this->addWhereIf( 'rc_user = 0', isset( $show['anon'] ) );
219 $this->addWhereIf( 'rc_user != 0', isset( $show['!anon'] ) );
220 $this->addWhereIf( 'rc_patrolled = 0', isset( $show['!patrolled'] ) );
221 $this->addWhereIf( 'rc_patrolled != 0', isset( $show['patrolled'] ) );
222 $this->addWhereIf( 'page_is_redirect = 1', isset( $show['redirect'] ) );
224 if ( isset( $show['unpatrolled'] ) ) {
225 // See ChangesList:isUnpatrolled
226 if ( $user->useRCPatrol() ) {
227 $this->addWhere( 'rc_patrolled = 0' );
228 } elseif ( $user->useNPPatrol() ) {
229 $this->addWhere( 'rc_patrolled = 0' );
230 $this->addWhereFld( 'rc_type', RC_NEW
);
234 // Don't throw log entries out the window here
236 'page_is_redirect = 0 OR page_is_redirect IS NULL',
237 isset( $show['!redirect'] )
241 if ( !is_null( $params['user'] ) && !is_null( $params['excludeuser'] ) ) {
242 $this->dieUsage( 'user and excludeuser cannot be used together', 'user-excludeuser' );
245 if ( !is_null( $params['user'] ) ) {
246 $this->addWhereFld( 'rc_user_text', $params['user'] );
247 $index['recentchanges'] = 'rc_user_text';
250 if ( !is_null( $params['excludeuser'] ) ) {
251 // We don't use the rc_user_text index here because
252 // * it would require us to sort by rc_user_text before rc_timestamp
253 // * the != condition doesn't throw out too many rows anyway
254 $this->addWhere( 'rc_user_text != ' . $this->getDB()->addQuotes( $params['excludeuser'] ) );
257 /* Add the fields we're concerned with to our query. */
258 $this->addFields( array(
267 $showRedirects = false;
268 /* Determine what properties we need to display. */
269 if ( !is_null( $params['prop'] ) ) {
270 $prop = array_flip( $params['prop'] );
272 /* Set up internal members based upon params. */
273 $this->initProperties( $prop );
275 if ( $this->fld_patrolled
&& !$user->useRCPatrol() && !$user->useNPPatrol() ) {
277 'You need the patrol right to request the patrolled flag',
282 $this->addFields( 'rc_id' );
283 /* Add fields to our query if they are specified as a needed parameter. */
284 $this->addFieldsIf( array( 'rc_this_oldid', 'rc_last_oldid' ), $this->fld_ids
);
285 $this->addFieldsIf( 'rc_comment', $this->fld_comment ||
$this->fld_parsedcomment
);
286 $this->addFieldsIf( 'rc_user', $this->fld_user
);
287 $this->addFieldsIf( 'rc_user_text', $this->fld_user ||
$this->fld_userid
);
288 $this->addFieldsIf( array( 'rc_minor', 'rc_type', 'rc_bot' ), $this->fld_flags
);
289 $this->addFieldsIf( array( 'rc_old_len', 'rc_new_len' ), $this->fld_sizes
);
290 $this->addFieldsIf( 'rc_patrolled', $this->fld_patrolled
);
292 array( 'rc_logid', 'rc_log_type', 'rc_log_action', 'rc_params' ),
295 $showRedirects = $this->fld_redirect ||
isset( $show['redirect'] )
296 ||
isset( $show['!redirect'] );
299 if ( $this->fld_tags
) {
300 $this->addTables( 'tag_summary' );
301 $this->addJoinConds( array( 'tag_summary' => array( 'LEFT JOIN', array( 'rc_id=ts_rc_id' ) ) ) );
302 $this->addFields( 'ts_tags' );
305 if ( $this->fld_sha1
) {
306 $this->addTables( 'revision' );
307 $this->addJoinConds( array( 'revision' => array( 'LEFT JOIN',
308 array( 'rc_this_oldid=rev_id' ) ) ) );
309 $this->addFields( array( 'rev_sha1', 'rev_deleted' ) );
312 if ( $params['toponly'] ||
$showRedirects ) {
313 $this->addTables( 'page' );
314 $this->addJoinConds( array( 'page' => array( 'LEFT JOIN',
315 array( 'rc_namespace=page_namespace', 'rc_title=page_title' ) ) ) );
316 $this->addFields( 'page_is_redirect' );
318 if ( $params['toponly'] ) {
319 $this->addWhere( 'rc_this_oldid = page_latest' );
323 if ( !is_null( $params['tag'] ) ) {
324 $this->addTables( 'change_tag' );
325 $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN', array( 'rc_id=ct_rc_id' ) ) ) );
326 $this->addWhereFld( 'ct_tag', $params['tag'] );
327 $index['change_tag'] = 'change_tag_tag_id';
330 $this->token
= $params['token'];
331 $this->addOption( 'LIMIT', $params['limit'] +
1 );
332 $this->addOption( 'USE INDEX', $index );
335 /* Perform the actual query. */
336 $res = $this->select( __METHOD__
);
340 $result = $this->getResult();
342 /* Iterate through the rows, adding data extracted from them to our query result. */
343 foreach ( $res as $row ) {
344 if ( ++
$count > $params['limit'] ) {
345 // We've reached the one extra which shows that there are
346 // additional pages to be had. Stop here...
347 $this->setContinueEnumParameter(
349 wfTimestamp( TS_ISO_8601
, $row->rc_timestamp
) . '|' . $row->rc_id
354 if ( is_null( $resultPageSet ) ) {
355 /* Extract the data from a single row. */
356 $vals = $this->extractRowInfo( $row );
358 /* Add that row's data to our final output. */
362 $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $vals );
364 $this->setContinueEnumParameter(
366 wfTimestamp( TS_ISO_8601
, $row->rc_timestamp
) . '|' . $row->rc_id
371 $titles[] = Title
::makeTitle( $row->rc_namespace
, $row->rc_title
);
375 if ( is_null( $resultPageSet ) ) {
376 /* Format the result */
377 $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'rc' );
379 $resultPageSet->populateFromTitles( $titles );
384 * Extracts from a single sql row the data needed to describe one recent change.
386 * @param mixed $row The row from which to extract the data.
387 * @return array An array mapping strings (descriptors) to their respective string values.
390 public function extractRowInfo( $row ) {
391 /* Determine the title of the page that has been changed. */
392 $title = Title
::makeTitle( $row->rc_namespace
, $row->rc_title
);
394 /* Our output data. */
397 $type = intval( $row->rc_type
);
399 /* Determine what kind of change this was. */
402 $vals['type'] = 'edit';
405 $vals['type'] = 'new';
408 $vals['type'] = 'move';
411 $vals['type'] = 'log';
414 $vals['type'] = 'external';
416 case RC_MOVE_OVER_REDIRECT
:
417 $vals['type'] = 'move over redirect';
420 $vals['type'] = $type;
423 /* Create a new entry in the result for the title. */
424 if ( $this->fld_title
) {
425 ApiQueryBase
::addTitleInfo( $vals, $title );
428 /* Add ids, such as rcid, pageid, revid, and oldid to the change's info. */
429 if ( $this->fld_ids
) {
430 $vals['rcid'] = intval( $row->rc_id
);
431 $vals['pageid'] = intval( $row->rc_cur_id
);
432 $vals['revid'] = intval( $row->rc_this_oldid
);
433 $vals['old_revid'] = intval( $row->rc_last_oldid
);
436 /* Add user data and 'anon' flag, if use is anonymous. */
437 if ( $this->fld_user ||
$this->fld_userid
) {
439 if ( $this->fld_user
) {
440 $vals['user'] = $row->rc_user_text
;
443 if ( $this->fld_userid
) {
444 $vals['userid'] = $row->rc_user
;
447 if ( !$row->rc_user
) {
452 /* Add flags, such as new, minor, bot. */
453 if ( $this->fld_flags
) {
454 if ( $row->rc_bot
) {
457 if ( $row->rc_type
== RC_NEW
) {
460 if ( $row->rc_minor
) {
465 /* Add sizes of each revision. (Only available on 1.10+) */
466 if ( $this->fld_sizes
) {
467 $vals['oldlen'] = intval( $row->rc_old_len
);
468 $vals['newlen'] = intval( $row->rc_new_len
);
471 /* Add the timestamp. */
472 if ( $this->fld_timestamp
) {
473 $vals['timestamp'] = wfTimestamp( TS_ISO_8601
, $row->rc_timestamp
);
476 /* Add edit summary / log summary. */
477 if ( $this->fld_comment
&& isset( $row->rc_comment
) ) {
478 $vals['comment'] = $row->rc_comment
;
481 if ( $this->fld_parsedcomment
&& isset( $row->rc_comment
) ) {
482 $vals['parsedcomment'] = Linker
::formatComment( $row->rc_comment
, $title );
485 if ( $this->fld_redirect
) {
486 if ( $row->page_is_redirect
) {
487 $vals['redirect'] = '';
491 /* Add the patrolled flag */
492 if ( $this->fld_patrolled
&& $row->rc_patrolled
== 1 ) {
493 $vals['patrolled'] = '';
496 if ( $this->fld_patrolled
&& ChangesList
::isUnpatrolled( $row, $this->getUser() ) ) {
497 $vals['unpatrolled'] = '';
500 if ( $this->fld_loginfo
&& $row->rc_type
== RC_LOG
) {
501 $vals['logid'] = intval( $row->rc_logid
);
502 $vals['logtype'] = $row->rc_log_type
;
503 $vals['logaction'] = $row->rc_log_action
;
504 $logEntry = DatabaseLogEntry
::newFromRow( (array)$row );
505 ApiQueryLogEvents
::addLogParams(
508 $logEntry->getParameters(),
509 $logEntry->getType(),
510 $logEntry->getSubtype(),
511 $logEntry->getTimestamp()
515 if ( $this->fld_tags
) {
516 if ( $row->ts_tags
) {
517 $tags = explode( ',', $row->ts_tags
);
518 $this->getResult()->setIndexedTagName( $tags, 'tag' );
519 $vals['tags'] = $tags;
521 $vals['tags'] = array();
525 if ( $this->fld_sha1
&& $row->rev_sha1
!== null ) {
526 // The RevDel check should currently never pass due to the
527 // rc_deleted = 0 condition in the WHERE clause, but in case that
528 // ever changes we check it here too.
529 if ( $row->rev_deleted
& Revision
::DELETED_TEXT
) {
530 $vals['sha1hidden'] = '';
531 } elseif ( $row->rev_sha1
!== '' ) {
532 $vals['sha1'] = wfBaseConvert( $row->rev_sha1
, 36, 16, 40 );
538 if ( !is_null( $this->token
) ) {
539 $tokenFunctions = $this->getTokenFunctions();
540 foreach ( $this->token
as $t ) {
541 $val = call_user_func( $tokenFunctions[$t], $row->rc_cur_id
,
542 $title, RecentChange
::newFromRow( $row ) );
543 if ( $val === false ) {
544 $this->setWarning( "Action '$t' is not allowed for the current user" );
546 $vals[$t . 'token'] = $val;
554 private function parseRCType( $type ) {
555 if ( is_array( $type ) ) {
557 foreach ( $type as $t ) {
558 $retval[] = $this->parseRCType( $t );
575 public function getCacheMode( $params ) {
576 if ( isset( $params['show'] ) ) {
577 foreach ( $params['show'] as $show ) {
578 if ( $show === 'patrolled' ||
$show === '!patrolled' ) {
583 if ( isset( $params['token'] ) ) {
586 if ( !is_null( $params['prop'] ) && in_array( 'parsedcomment', $params['prop'] ) ) {
587 // formatComment() calls wfMessage() among other things
588 return 'anon-public-user-private';
594 public function getAllowedParams() {
597 ApiBase
::PARAM_TYPE
=> 'timestamp'
600 ApiBase
::PARAM_TYPE
=> 'timestamp'
603 ApiBase
::PARAM_DFLT
=> 'older',
604 ApiBase
::PARAM_TYPE
=> array(
609 'namespace' => array(
610 ApiBase
::PARAM_ISMULTI
=> true,
611 ApiBase
::PARAM_TYPE
=> 'namespace'
614 ApiBase
::PARAM_TYPE
=> 'user'
616 'excludeuser' => array(
617 ApiBase
::PARAM_TYPE
=> 'user'
621 ApiBase
::PARAM_ISMULTI
=> true,
622 ApiBase
::PARAM_DFLT
=> 'title|timestamp|ids',
623 ApiBase
::PARAM_TYPE
=> array(
641 ApiBase
::PARAM_TYPE
=> array_keys( $this->getTokenFunctions() ),
642 ApiBase
::PARAM_ISMULTI
=> true
645 ApiBase
::PARAM_ISMULTI
=> true,
646 ApiBase
::PARAM_TYPE
=> array(
661 ApiBase
::PARAM_DFLT
=> 10,
662 ApiBase
::PARAM_TYPE
=> 'limit',
663 ApiBase
::PARAM_MIN
=> 1,
664 ApiBase
::PARAM_MAX
=> ApiBase
::LIMIT_BIG1
,
665 ApiBase
::PARAM_MAX2
=> ApiBase
::LIMIT_BIG2
668 ApiBase
::PARAM_ISMULTI
=> true,
669 ApiBase
::PARAM_TYPE
=> array(
681 public function getParamDescription() {
682 $p = $this->getModulePrefix();
685 'start' => 'The timestamp to start enumerating from',
686 'end' => 'The timestamp to end enumerating',
687 'dir' => $this->getDirectionDescription( $p ),
688 'namespace' => 'Filter log entries to only this namespace(s)',
689 'user' => 'Only list changes by this user',
690 'excludeuser' => 'Don\'t list changes by this user',
692 'Include additional pieces of information',
693 ' user - Adds the user responsible for the edit and tags if they are an IP',
694 ' userid - Adds the user id responsible for the edit',
695 ' comment - Adds the comment for the edit',
696 ' parsedcomment - Adds the parsed comment for the edit',
697 ' flags - Adds flags for the edit',
698 ' timestamp - Adds timestamp of the edit',
699 ' title - Adds the page title of the edit',
700 ' ids - Adds the page ID, recent changes ID and the new and old revision ID',
701 ' sizes - Adds the new and old page length in bytes',
702 ' redirect - Tags edit if page is a redirect',
703 ' patrolled - Tags patrollable edits as being patrolled or unpatrolled',
704 ' loginfo - Adds log information (logid, logtype, etc) to log entries',
705 ' tags - Lists tags for the entry',
706 ' sha1 - Adds the content checksum for entries associated with a revision',
708 'token' => 'Which tokens to obtain for each change',
710 'Show only items that meet this criteria.',
711 "For example, to see only minor edits done by logged-in users, set {$p}show=minor|!anon"
713 'type' => 'Which types of changes to show',
714 'limit' => 'How many total changes to return',
715 'tag' => 'Only list changes tagged with this tag',
716 'toponly' => 'Only list changes which are the latest revision',
717 'continue' => 'When more results are available, use this to continue',
721 public function getResultProperties() {
726 ApiBase
::PROP_TYPE
=> array(
739 ApiBase
::PROP_TYPE
=> 'namespace',
740 ApiBase
::PROP_NULLABLE
=> true
742 'new_title' => array(
743 ApiBase
::PROP_TYPE
=> 'string',
744 ApiBase
::PROP_NULLABLE
=> true
749 'pageid' => 'integer',
750 'revid' => 'integer',
751 'old_revid' => 'integer'
758 'userid' => 'integer',
767 'oldlen' => 'integer',
768 'newlen' => 'integer'
770 'timestamp' => array(
771 'timestamp' => 'timestamp'
775 ApiBase
::PROP_TYPE
=> 'string',
776 ApiBase
::PROP_NULLABLE
=> true
779 'parsedcomment' => array(
780 'parsedcomment' => array(
781 ApiBase
::PROP_TYPE
=> 'string',
782 ApiBase
::PROP_NULLABLE
=> true
786 'redirect' => 'boolean'
788 'patrolled' => array(
789 'patrolled' => 'boolean',
790 'unpatrolled' => 'boolean'
794 ApiBase
::PROP_TYPE
=> 'integer',
795 ApiBase
::PROP_NULLABLE
=> true
798 ApiBase
::PROP_TYPE
=> $wgLogTypes,
799 ApiBase
::PROP_NULLABLE
=> true
801 'logaction' => array(
802 ApiBase
::PROP_TYPE
=> 'string',
803 ApiBase
::PROP_NULLABLE
=> true
808 ApiBase
::PROP_TYPE
=> 'string',
809 ApiBase
::PROP_NULLABLE
=> true
811 'sha1hidden' => array(
812 ApiBase
::PROP_TYPE
=> 'boolean',
813 ApiBase
::PROP_NULLABLE
=> true
818 self
::addTokenProperties( $props, $this->getTokenFunctions() );
823 public function getDescription() {
824 return 'Enumerate recent changes';
827 public function getPossibleErrors() {
828 return array_merge( parent
::getPossibleErrors(), array(
831 'code' => 'permissiondenied',
832 'info' => 'You need the patrol right to request the patrolled flag'
834 array( 'code' => 'user-excludeuser', 'info' => 'user and excludeuser cannot be used together' ),
838 public function getExamples() {
840 'api.php?action=query&list=recentchanges'
844 public function getHelpUrls() {
845 return 'https://www.mediawiki.org/wiki/API:Recentchanges';