MediaWiki  1.23.13
ApiQueryRecentChanges.php
Go to the documentation of this file.
1 <?php
34 
35  public function __construct( $query, $moduleName ) {
36  parent::__construct( $query, $moduleName, 'rc' );
37  }
38 
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();
43 
44  private $tokenFunctions;
45 
52  protected function getTokenFunctions() {
53  // Don't call the hooks twice
54  if ( isset( $this->tokenFunctions ) ) {
55  return $this->tokenFunctions;
56  }
57 
58  // If we're in JSON callback mode, no tokens can be obtained
59  if ( !is_null( $this->getMain()->getRequest()->getVal( 'callback' ) ) ) {
60  return array();
61  }
62 
63  $this->tokenFunctions = array(
64  'patrol' => array( 'ApiQueryRecentChanges', 'getPatrolToken' )
65  );
66  wfRunHooks( 'APIQueryRecentChangesTokens', array( &$this->tokenFunctions ) );
67 
68  return $this->tokenFunctions;
69  }
70 
77  public static function getPatrolToken( $pageid, $title, $rc = null ) {
79 
80  $validTokenUser = false;
81 
82  if ( $rc ) {
83  if ( ( $wgUser->useRCPatrol() && $rc->getAttribute( 'rc_type' ) == RC_EDIT ) ||
84  ( $wgUser->useNPPatrol() && $rc->getAttribute( 'rc_type' ) == RC_NEW )
85  ) {
86  $validTokenUser = true;
87  }
88  } elseif ( $wgUser->useRCPatrol() || $wgUser->useNPPatrol() ) {
89  $validTokenUser = true;
90  }
91 
92  if ( $validTokenUser ) {
93  // The patrol token is always the same, let's exploit that
94  static $cachedPatrolToken = null;
95 
96  if ( is_null( $cachedPatrolToken ) ) {
97  $cachedPatrolToken = $wgUser->getEditToken( 'patrol' );
98  }
99 
100  return $cachedPatrolToken;
101  }
102 
103  return false;
104  }
105 
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'] );
125  }
126 
127  public function execute() {
128  $this->run();
129  }
130 
131  public function executeGenerator( $resultPageSet ) {
132  $this->run( $resultPageSet );
133  }
134 
140  public function run( $resultPageSet = null ) {
141  $user = $this->getUser();
142  /* Get the parameters of the request. */
143  $params = $this->extractRequestParams();
144 
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
148  */
149  $this->addTables( 'recentchanges' );
150  $index = array( 'recentchanges' => 'rc_timestamp' ); // May change
151  $this->addTimestampWhereRange( 'rc_timestamp', $params['dir'], $params['start'], $params['end'] );
152 
153  if ( !is_null( $params['continue'] ) ) {
154  $cont = explode( '|', $params['continue'] );
155  $this->dieContinueUsageIf( count( $cont ) != 2 );
156  $db = $this->getDB();
157  $timestamp = $db->addQuotes( $db->timestamp( $cont[0] ) );
158  $id = intval( $cont[1] );
159  $this->dieContinueUsageIf( $id != $cont[1] );
160  $op = $params['dir'] === 'older' ? '<' : '>';
161  $this->addWhere(
162  "rc_timestamp $op $timestamp OR " .
163  "(rc_timestamp = $timestamp AND " .
164  "rc_id $op= $id)"
165  );
166  }
167 
168  $order = $params['dir'] === 'older' ? 'DESC' : 'ASC';
169  $this->addOption( 'ORDER BY', array(
170  "rc_timestamp $order",
171  "rc_id $order",
172  ) );
173 
174  $this->addWhereFld( 'rc_namespace', $params['namespace'] );
175 
176  if ( !is_null( $params['type'] ) ) {
177  $this->addWhereFld( 'rc_type', $this->parseRCType( $params['type'] ) );
178  }
179 
180  if ( !is_null( $params['show'] ) ) {
181  $show = array_flip( $params['show'] );
182 
183  /* Check for conflicting parameters. */
184  if ( ( isset( $show['minor'] ) && isset( $show['!minor'] ) )
185  || ( isset( $show['bot'] ) && isset( $show['!bot'] ) )
186  || ( isset( $show['anon'] ) && isset( $show['!anon'] ) )
187  || ( isset( $show['redirect'] ) && isset( $show['!redirect'] ) )
188  || ( isset( $show['patrolled'] ) && isset( $show['!patrolled'] ) )
189  || ( isset( $show['patrolled'] ) && isset( $show['unpatrolled'] ) )
190  || ( isset( $show['!patrolled'] ) && isset( $show['unpatrolled'] ) )
191  ) {
192  $this->dieUsageMsg( 'show' );
193  }
194 
195  // Check permissions
196  if ( isset( $show['patrolled'] )
197  || isset( $show['!patrolled'] )
198  || isset( $show['unpatrolled'] )
199  ) {
200  if ( !$user->useRCPatrol() && !$user->useNPPatrol() ) {
201  $this->dieUsage(
202  'You need the patrol right to request the patrolled flag',
203  'permissiondenied'
204  );
205  }
206  }
207 
208  /* Add additional conditions to query depending upon parameters. */
209  $this->addWhereIf( 'rc_minor = 0', isset( $show['!minor'] ) );
210  $this->addWhereIf( 'rc_minor != 0', isset( $show['minor'] ) );
211  $this->addWhereIf( 'rc_bot = 0', isset( $show['!bot'] ) );
212  $this->addWhereIf( 'rc_bot != 0', isset( $show['bot'] ) );
213  $this->addWhereIf( 'rc_user = 0', isset( $show['anon'] ) );
214  $this->addWhereIf( 'rc_user != 0', isset( $show['!anon'] ) );
215  $this->addWhereIf( 'rc_patrolled = 0', isset( $show['!patrolled'] ) );
216  $this->addWhereIf( 'rc_patrolled != 0', isset( $show['patrolled'] ) );
217  $this->addWhereIf( 'page_is_redirect = 1', isset( $show['redirect'] ) );
218 
219  if ( isset( $show['unpatrolled'] ) ) {
220  // See ChangesList:isUnpatrolled
221  if ( $user->useRCPatrol() ) {
222  $this->addWhere( 'rc_patrolled = 0' );
223  } elseif ( $user->useNPPatrol() ) {
224  $this->addWhere( 'rc_patrolled = 0' );
225  $this->addWhereFld( 'rc_type', RC_NEW );
226  }
227  }
228 
229  // Don't throw log entries out the window here
230  $this->addWhereIf(
231  'page_is_redirect = 0 OR page_is_redirect IS NULL',
232  isset( $show['!redirect'] )
233  );
234  }
235 
236  if ( !is_null( $params['user'] ) && !is_null( $params['excludeuser'] ) ) {
237  $this->dieUsage( 'user and excludeuser cannot be used together', 'user-excludeuser' );
238  }
239 
240  if ( !is_null( $params['user'] ) ) {
241  $this->addWhereFld( 'rc_user_text', $params['user'] );
242  $index['recentchanges'] = 'rc_user_text';
243  }
244 
245  if ( !is_null( $params['excludeuser'] ) ) {
246  // We don't use the rc_user_text index here because
247  // * it would require us to sort by rc_user_text before rc_timestamp
248  // * the != condition doesn't throw out too many rows anyway
249  $this->addWhere( 'rc_user_text != ' . $this->getDB()->addQuotes( $params['excludeuser'] ) );
250  }
251 
252  /* Add the fields we're concerned with to our query. */
253  $this->addFields( array(
254  'rc_id',
255  'rc_timestamp',
256  'rc_namespace',
257  'rc_title',
258  'rc_cur_id',
259  'rc_type',
260  'rc_deleted'
261  ) );
262 
263  $showRedirects = false;
264  /* Determine what properties we need to display. */
265  if ( !is_null( $params['prop'] ) ) {
266  $prop = array_flip( $params['prop'] );
267 
268  /* Set up internal members based upon params. */
269  $this->initProperties( $prop );
270 
271  if ( $this->fld_patrolled && !$user->useRCPatrol() && !$user->useNPPatrol() ) {
272  $this->dieUsage(
273  'You need the patrol right to request the patrolled flag',
274  'permissiondenied'
275  );
276  }
277 
278  /* Add fields to our query if they are specified as a needed parameter. */
279  $this->addFieldsIf( array( 'rc_this_oldid', 'rc_last_oldid' ), $this->fld_ids );
280  $this->addFieldsIf( 'rc_comment', $this->fld_comment || $this->fld_parsedcomment );
281  $this->addFieldsIf( 'rc_user', $this->fld_user || $this->fld_userid );
282  $this->addFieldsIf( 'rc_user_text', $this->fld_user );
283  $this->addFieldsIf( array( 'rc_minor', 'rc_type', 'rc_bot' ), $this->fld_flags );
284  $this->addFieldsIf( array( 'rc_old_len', 'rc_new_len' ), $this->fld_sizes );
285  $this->addFieldsIf( 'rc_patrolled', $this->fld_patrolled );
286  $this->addFieldsIf(
287  array( 'rc_logid', 'rc_log_type', 'rc_log_action', 'rc_params' ),
288  $this->fld_loginfo
289  );
290  $showRedirects = $this->fld_redirect || isset( $show['redirect'] )
291  || isset( $show['!redirect'] );
292  }
293 
294  if ( $this->fld_tags ) {
295  $this->addTables( 'tag_summary' );
296  $this->addJoinConds( array( 'tag_summary' => array( 'LEFT JOIN', array( 'rc_id=ts_rc_id' ) ) ) );
297  $this->addFields( 'ts_tags' );
298  }
299 
300  if ( $this->fld_sha1 ) {
301  $this->addTables( 'revision' );
302  $this->addJoinConds( array( 'revision' => array( 'LEFT JOIN',
303  array( 'rc_this_oldid=rev_id' ) ) ) );
304  $this->addFields( array( 'rev_sha1', 'rev_deleted' ) );
305  }
306 
307  if ( $params['toponly'] || $showRedirects ) {
308  $this->addTables( 'page' );
309  $this->addJoinConds( array( 'page' => array( 'LEFT JOIN',
310  array( 'rc_namespace=page_namespace', 'rc_title=page_title' ) ) ) );
311  $this->addFields( 'page_is_redirect' );
312 
313  if ( $params['toponly'] ) {
314  $this->addWhere( 'rc_this_oldid = page_latest' );
315  }
316  }
317 
318  if ( !is_null( $params['tag'] ) ) {
319  $this->addTables( 'change_tag' );
320  $this->addJoinConds( array( 'change_tag' => array( 'INNER JOIN', array( 'rc_id=ct_rc_id' ) ) ) );
321  $this->addWhereFld( 'ct_tag', $params['tag'] );
322  }
323 
324  // Paranoia: avoid brute force searches (bug 17342)
325  if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) {
326  if ( !$user->isAllowed( 'deletedhistory' ) ) {
327  $bitmask = Revision::DELETED_USER;
328  } elseif ( !$user->isAllowed( 'suppressrevision' ) ) {
330  } else {
331  $bitmask = 0;
332  }
333  if ( $bitmask ) {
334  $this->addWhere( $this->getDB()->bitAnd( 'rc_deleted', $bitmask ) . " != $bitmask" );
335  }
336  }
337  if ( $this->getRequest()->getCheck( 'namespace' ) ) {
338  // LogPage::DELETED_ACTION hides the affected page, too.
339  if ( !$user->isAllowed( 'deletedhistory' ) ) {
340  $bitmask = LogPage::DELETED_ACTION;
341  } elseif ( !$user->isAllowed( 'suppressrevision' ) ) {
343  } else {
344  $bitmask = 0;
345  }
346  if ( $bitmask ) {
347  $this->addWhere( $this->getDB()->makeList( array(
348  'rc_type != ' . RC_LOG,
349  $this->getDB()->bitAnd( 'rc_deleted', $bitmask ) . " != $bitmask",
350  ), LIST_OR ) );
351  }
352  }
353 
354  $this->token = $params['token'];
355  $this->addOption( 'LIMIT', $params['limit'] + 1 );
356  $this->addOption( 'USE INDEX', $index );
357 
358  $count = 0;
359  /* Perform the actual query. */
360  $res = $this->select( __METHOD__ );
361 
362  $titles = array();
363 
364  $result = $this->getResult();
365 
366  /* Iterate through the rows, adding data extracted from them to our query result. */
367  foreach ( $res as $row ) {
368  if ( ++$count > $params['limit'] ) {
369  // We've reached the one extra which shows that there are
370  // additional pages to be had. Stop here...
371  $this->setContinueEnumParameter( 'continue', "$row->rc_timestamp|$row->rc_id" );
372  break;
373  }
374 
375  if ( is_null( $resultPageSet ) ) {
376  /* Extract the data from a single row. */
377  $vals = $this->extractRowInfo( $row );
378 
379  /* Add that row's data to our final output. */
380  if ( !$vals ) {
381  continue;
382  }
383  $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $vals );
384  if ( !$fit ) {
385  $this->setContinueEnumParameter( 'continue', "$row->rc_timestamp|$row->rc_id" );
386  break;
387  }
388  } else {
389  $titles[] = Title::makeTitle( $row->rc_namespace, $row->rc_title );
390  }
391  }
392 
393  if ( is_null( $resultPageSet ) ) {
394  /* Format the result */
395  $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'rc' );
396  } else {
397  $resultPageSet->populateFromTitles( $titles );
398  }
399  }
400 
408  public function extractRowInfo( $row ) {
409  /* Determine the title of the page that has been changed. */
410  $title = Title::makeTitle( $row->rc_namespace, $row->rc_title );
411  $user = $this->getUser();
412 
413  /* Our output data. */
414  $vals = array();
415 
416  $type = intval( $row->rc_type );
417 
418  /* Determine what kind of change this was. */
419  switch ( $type ) {
420  case RC_EDIT:
421  $vals['type'] = 'edit';
422  break;
423  case RC_NEW:
424  $vals['type'] = 'new';
425  break;
426  case RC_MOVE:
427  $vals['type'] = 'move';
428  break;
429  case RC_LOG:
430  $vals['type'] = 'log';
431  break;
432  case RC_EXTERNAL:
433  $vals['type'] = 'external';
434  break;
436  $vals['type'] = 'move over redirect';
437  break;
438  default:
439  $vals['type'] = $type;
440  }
441 
442  $anyHidden = false;
443 
444  /* Create a new entry in the result for the title. */
445  if ( $this->fld_title || $this->fld_ids ) {
446  if ( $type === RC_LOG && ( $row->rc_deleted & LogPage::DELETED_ACTION ) ) {
447  $vals['actionhidden'] = '';
448  $anyHidden = true;
449  }
450  if ( $type !== RC_LOG ||
452  ) {
453  if ( $this->fld_title ) {
455  }
456  if ( $this->fld_ids ) {
457  $vals['pageid'] = intval( $row->rc_cur_id );
458  $vals['revid'] = intval( $row->rc_this_oldid );
459  $vals['old_revid'] = intval( $row->rc_last_oldid );
460  }
461  }
462  }
463 
464  if ( $this->fld_ids ) {
465  $vals['rcid'] = intval( $row->rc_id );
466  }
467 
468  /* Add user data and 'anon' flag, if user is anonymous. */
469  if ( $this->fld_user || $this->fld_userid ) {
470  if ( $row->rc_deleted & Revision::DELETED_USER ) {
471  $vals['userhidden'] = '';
472  $anyHidden = true;
473  }
474  if ( Revision::userCanBitfield( $row->rc_deleted, Revision::DELETED_USER, $user ) ) {
475  if ( $this->fld_user ) {
476  $vals['user'] = $row->rc_user_text;
477  }
478 
479  if ( $this->fld_userid ) {
480  $vals['userid'] = $row->rc_user;
481  }
482 
483  if ( !$row->rc_user ) {
484  $vals['anon'] = '';
485  }
486  }
487  }
488 
489  /* Add flags, such as new, minor, bot. */
490  if ( $this->fld_flags ) {
491  if ( $row->rc_bot ) {
492  $vals['bot'] = '';
493  }
494  if ( $row->rc_type == RC_NEW ) {
495  $vals['new'] = '';
496  }
497  if ( $row->rc_minor ) {
498  $vals['minor'] = '';
499  }
500  }
501 
502  /* Add sizes of each revision. (Only available on 1.10+) */
503  if ( $this->fld_sizes ) {
504  $vals['oldlen'] = intval( $row->rc_old_len );
505  $vals['newlen'] = intval( $row->rc_new_len );
506  }
507 
508  /* Add the timestamp. */
509  if ( $this->fld_timestamp ) {
510  $vals['timestamp'] = wfTimestamp( TS_ISO_8601, $row->rc_timestamp );
511  }
512 
513  /* Add edit summary / log summary. */
514  if ( $this->fld_comment || $this->fld_parsedcomment ) {
515  if ( $row->rc_deleted & Revision::DELETED_COMMENT ) {
516  $vals['commenthidden'] = '';
517  $anyHidden = true;
518  }
519  if ( Revision::userCanBitfield( $row->rc_deleted, Revision::DELETED_COMMENT, $user ) ) {
520  if ( $this->fld_comment && isset( $row->rc_comment ) ) {
521  $vals['comment'] = $row->rc_comment;
522  }
523 
524  if ( $this->fld_parsedcomment && isset( $row->rc_comment ) ) {
525  $vals['parsedcomment'] = Linker::formatComment( $row->rc_comment, $title );
526  }
527  }
528  }
529 
530  if ( $this->fld_redirect ) {
531  if ( $row->page_is_redirect ) {
532  $vals['redirect'] = '';
533  }
534  }
535 
536  /* Add the patrolled flag */
537  if ( $this->fld_patrolled && $row->rc_patrolled == 1 ) {
538  $vals['patrolled'] = '';
539  }
540 
541  if ( $this->fld_patrolled && ChangesList::isUnpatrolled( $row, $user ) ) {
542  $vals['unpatrolled'] = '';
543  }
544 
545  if ( $this->fld_loginfo && $row->rc_type == RC_LOG ) {
546  if ( $row->rc_deleted & LogPage::DELETED_ACTION ) {
547  $vals['actionhidden'] = '';
548  $anyHidden = true;
549  }
550  if ( LogEventsList::userCanBitfield( $row->rc_deleted, LogPage::DELETED_ACTION, $user ) ) {
551  $vals['logid'] = intval( $row->rc_logid );
552  $vals['logtype'] = $row->rc_log_type;
553  $vals['logaction'] = $row->rc_log_action;
554  $logEntry = DatabaseLogEntry::newFromRow( (array)$row );
556  $this->getResult(),
557  $vals,
558  $logEntry->getParameters(),
559  $logEntry->getType(),
560  $logEntry->getSubtype(),
561  $logEntry->getTimestamp()
562  );
563  }
564  }
565 
566  if ( $this->fld_tags ) {
567  if ( $row->ts_tags ) {
568  $tags = explode( ',', $row->ts_tags );
569  $this->getResult()->setIndexedTagName( $tags, 'tag' );
570  $vals['tags'] = $tags;
571  } else {
572  $vals['tags'] = array();
573  }
574  }
575 
576  if ( $this->fld_sha1 && $row->rev_sha1 !== null ) {
577  if ( $row->rev_deleted & Revision::DELETED_TEXT ) {
578  $vals['sha1hidden'] = '';
579  $anyHidden = true;
580  }
581  if ( Revision::userCanBitfield( $row->rev_deleted, Revision::DELETED_TEXT, $user ) ) {
582  if ( $row->rev_sha1 !== '' ) {
583  $vals['sha1'] = wfBaseConvert( $row->rev_sha1, 36, 16, 40 );
584  } else {
585  $vals['sha1'] = '';
586  }
587  }
588  }
589 
590  if ( !is_null( $this->token ) ) {
592  foreach ( $this->token as $t ) {
593  $val = call_user_func( $tokenFunctions[$t], $row->rc_cur_id,
594  $title, RecentChange::newFromRow( $row ) );
595  if ( $val === false ) {
596  $this->setWarning( "Action '$t' is not allowed for the current user" );
597  } else {
598  $vals[$t . 'token'] = $val;
599  }
600  }
601  }
602 
603  if ( $anyHidden && ( $row->rc_deleted & Revision::DELETED_RESTRICTED ) ) {
604  $vals['suppressed'] = '';
605  }
606 
607  return $vals;
608  }
609 
610  private function parseRCType( $type ) {
611  if ( is_array( $type ) ) {
612  $retval = array();
613  foreach ( $type as $t ) {
614  $retval[] = $this->parseRCType( $t );
615  }
616 
617  return $retval;
618  }
619 
620  switch ( $type ) {
621  case 'edit':
622  return RC_EDIT;
623  case 'new':
624  return RC_NEW;
625  case 'log':
626  return RC_LOG;
627  case 'external':
628  return RC_EXTERNAL;
629  default:
630  ApiBase::dieDebug( __METHOD__, "Unknown type '$type'" );
631  }
632  }
633 
634  public function getCacheMode( $params ) {
635  if ( isset( $params['show'] ) ) {
636  foreach ( $params['show'] as $show ) {
637  if ( $show === 'patrolled' || $show === '!patrolled' ) {
638  return 'private';
639  }
640  }
641  }
642  if ( isset( $params['token'] ) ) {
643  return 'private';
644  }
645  if ( $this->userCanSeeRevDel() ) {
646  return 'private';
647  }
648  if ( !is_null( $params['prop'] ) && in_array( 'parsedcomment', $params['prop'] ) ) {
649  // formatComment() calls wfMessage() among other things
650  return 'anon-public-user-private';
651  }
652 
653  return 'public';
654  }
655 
656  public function getAllowedParams() {
657  return array(
658  'start' => array(
659  ApiBase::PARAM_TYPE => 'timestamp'
660  ),
661  'end' => array(
662  ApiBase::PARAM_TYPE => 'timestamp'
663  ),
664  'dir' => array(
665  ApiBase::PARAM_DFLT => 'older',
667  'newer',
668  'older'
669  )
670  ),
671  'namespace' => array(
672  ApiBase::PARAM_ISMULTI => true,
673  ApiBase::PARAM_TYPE => 'namespace'
674  ),
675  'user' => array(
676  ApiBase::PARAM_TYPE => 'user'
677  ),
678  'excludeuser' => array(
679  ApiBase::PARAM_TYPE => 'user'
680  ),
681  'tag' => null,
682  'prop' => array(
683  ApiBase::PARAM_ISMULTI => true,
684  ApiBase::PARAM_DFLT => 'title|timestamp|ids',
686  'user',
687  'userid',
688  'comment',
689  'parsedcomment',
690  'flags',
691  'timestamp',
692  'title',
693  'ids',
694  'sizes',
695  'redirect',
696  'patrolled',
697  'loginfo',
698  'tags',
699  'sha1',
700  )
701  ),
702  'token' => array(
703  ApiBase::PARAM_TYPE => array_keys( $this->getTokenFunctions() ),
704  ApiBase::PARAM_ISMULTI => true
705  ),
706  'show' => array(
707  ApiBase::PARAM_ISMULTI => true,
709  'minor',
710  '!minor',
711  'bot',
712  '!bot',
713  'anon',
714  '!anon',
715  'redirect',
716  '!redirect',
717  'patrolled',
718  '!patrolled',
719  'unpatrolled'
720  )
721  ),
722  'limit' => array(
723  ApiBase::PARAM_DFLT => 10,
724  ApiBase::PARAM_TYPE => 'limit',
725  ApiBase::PARAM_MIN => 1,
728  ),
729  'type' => array(
730  ApiBase::PARAM_ISMULTI => true,
732  'edit',
733  'external',
734  'new',
735  'log'
736  )
737  ),
738  'toponly' => false,
739  'continue' => null,
740  );
741  }
742 
743  public function getParamDescription() {
744  $p = $this->getModulePrefix();
745 
746  return array(
747  'start' => 'The timestamp to start enumerating from',
748  'end' => 'The timestamp to end enumerating',
749  'dir' => $this->getDirectionDescription( $p ),
750  'namespace' => 'Filter log entries to only this namespace(s)',
751  'user' => 'Only list changes by this user',
752  'excludeuser' => 'Don\'t list changes by this user',
753  'prop' => array(
754  'Include additional pieces of information',
755  ' user - Adds the user responsible for the edit and tags if they are an IP',
756  ' userid - Adds the user id responsible for the edit',
757  ' comment - Adds the comment for the edit',
758  ' parsedcomment - Adds the parsed comment for the edit',
759  ' flags - Adds flags for the edit',
760  ' timestamp - Adds timestamp of the edit',
761  ' title - Adds the page title of the edit',
762  ' ids - Adds the page ID, recent changes ID and the new and old revision ID',
763  ' sizes - Adds the new and old page length in bytes',
764  ' redirect - Tags edit if page is a redirect',
765  ' patrolled - Tags patrollable edits as being patrolled or unpatrolled',
766  ' loginfo - Adds log information (logid, logtype, etc) to log entries',
767  ' tags - Lists tags for the entry',
768  ' sha1 - Adds the content checksum for entries associated with a revision',
769  ),
770  'token' => 'Which tokens to obtain for each change',
771  'show' => array(
772  'Show only items that meet this criteria.',
773  "For example, to see only minor edits done by logged-in users, set {$p}show=minor|!anon"
774  ),
775  'type' => 'Which types of changes to show',
776  'limit' => 'How many total changes to return',
777  'tag' => 'Only list changes tagged with this tag',
778  'toponly' => 'Only list changes which are the latest revision',
779  'continue' => 'When more results are available, use this to continue',
780  );
781  }
782 
783  public function getResultProperties() {
784  global $wgLogTypes;
785  $props = array(
786  '' => array(
787  'type' => array(
789  'edit',
790  'new',
791  'move',
792  'log',
793  'move over redirect'
794  )
795  )
796  ),
797  'title' => array(
798  'ns' => 'namespace',
799  'title' => 'string',
800  'new_ns' => array(
801  ApiBase::PROP_TYPE => 'namespace',
802  ApiBase::PROP_NULLABLE => true
803  ),
804  'new_title' => array(
805  ApiBase::PROP_TYPE => 'string',
806  ApiBase::PROP_NULLABLE => true
807  )
808  ),
809  'ids' => array(
810  'rcid' => 'integer',
811  'pageid' => 'integer',
812  'revid' => 'integer',
813  'old_revid' => 'integer'
814  ),
815  'user' => array(
816  'user' => 'string',
817  'anon' => 'boolean'
818  ),
819  'userid' => array(
820  'userid' => 'integer',
821  'anon' => 'boolean'
822  ),
823  'flags' => array(
824  'bot' => 'boolean',
825  'new' => 'boolean',
826  'minor' => 'boolean'
827  ),
828  'sizes' => array(
829  'oldlen' => 'integer',
830  'newlen' => 'integer'
831  ),
832  'timestamp' => array(
833  'timestamp' => 'timestamp'
834  ),
835  'comment' => array(
836  'comment' => array(
837  ApiBase::PROP_TYPE => 'string',
838  ApiBase::PROP_NULLABLE => true
839  )
840  ),
841  'parsedcomment' => array(
842  'parsedcomment' => array(
843  ApiBase::PROP_TYPE => 'string',
844  ApiBase::PROP_NULLABLE => true
845  )
846  ),
847  'redirect' => array(
848  'redirect' => 'boolean'
849  ),
850  'patrolled' => array(
851  'patrolled' => 'boolean',
852  'unpatrolled' => 'boolean'
853  ),
854  'loginfo' => array(
855  'logid' => array(
856  ApiBase::PROP_TYPE => 'integer',
857  ApiBase::PROP_NULLABLE => true
858  ),
859  'logtype' => array(
860  ApiBase::PROP_TYPE => $wgLogTypes,
861  ApiBase::PROP_NULLABLE => true
862  ),
863  'logaction' => array(
864  ApiBase::PROP_TYPE => 'string',
865  ApiBase::PROP_NULLABLE => true
866  )
867  ),
868  'sha1' => array(
869  'sha1' => array(
870  ApiBase::PROP_TYPE => 'string',
871  ApiBase::PROP_NULLABLE => true
872  ),
873  'sha1hidden' => array(
874  ApiBase::PROP_TYPE => 'boolean',
875  ApiBase::PROP_NULLABLE => true
876  ),
877  ),
878  );
879 
880  self::addTokenProperties( $props, $this->getTokenFunctions() );
881 
882  return $props;
883  }
884 
885  public function getDescription() {
886  return 'Enumerate recent changes.';
887  }
888 
889  public function getPossibleErrors() {
890  return array_merge( parent::getPossibleErrors(), array(
891  array( 'show' ),
892  array(
893  'code' => 'permissiondenied',
894  'info' => 'You need the patrol right to request the patrolled flag'
895  ),
896  array( 'code' => 'user-excludeuser', 'info' => 'user and excludeuser cannot be used together' ),
897  ) );
898  }
899 
900  public function getExamples() {
901  return array(
902  'api.php?action=query&list=recentchanges'
903  );
904  }
905 
906  public function getHelpUrls() {
907  return 'https://www.mediawiki.org/wiki/API:Recentchanges';
908  }
909 }
ApiQueryRecentChanges\getPatrolToken
static getPatrolToken( $pageid, $title, $rc=null)
Definition: ApiQueryRecentChanges.php:77
ApiQueryRecentChanges\run
run( $resultPageSet=null)
Generates and outputs the result of this query based upon the provided parameters.
Definition: ApiQueryRecentChanges.php:140
Revision\DELETED_USER
const DELETED_USER
Definition: Revision.php:67
Title\makeTitle
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:398
ApiQueryRecentChanges\$fld_comment
$fld_comment
Definition: ApiQueryRecentChanges.php:39
$wgUser
$wgUser
Definition: Setup.php:572
Revision\DELETED_RESTRICTED
const DELETED_RESTRICTED
Definition: Revision.php:68
$result
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. $reader:XMLReader object $logInfo:Array of information Return false to stop further processing of the tag 'ImportHandlePageXMLTag':When parsing a XML tag in a page. $reader:XMLReader object $pageInfo:Array of information Return false to stop further processing of the tag 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information Return false to stop further processing of the tag 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. $reader:XMLReader object Return false to stop further processing of the tag 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. $reader:XMLReader object $revisionInfo:Array of information Return false to stop further processing of the tag 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. $title:Title object for the current page $request:WebRequest $ignoreRedirect:boolean to skip redirect check $target:Title/string of redirect target $article:Article object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) $article:article(object) being checked 'IsTrustedProxy':Override the result of wfIsTrustedProxy() $ip:IP being check $result:Change this value to override the result of wfIsTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of User::isValidEmailAddr(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetMagic':DEPRECATED, use $magicWords in a file listed in $wgExtensionMessagesFiles instead. Use this to define synonyms of magic words depending of the language $magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetSpecialPageAliases':DEPRECATED, use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead. Use to define aliases of special pages names depending of the language $specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Associative array mapping language codes to prefixed links of the form "language:title". & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LinkBegin':Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
Definition: hooks.txt:1528
ApiQueryBase\addFields
addFields( $value)
Add a set of fields to select to the internal array.
Definition: ApiQueryBase.php:117
ApiQueryRecentChanges\$fld_ids
$fld_ids
Definition: ApiQueryRecentChanges.php:40
RC_EXTERNAL
const RC_EXTERNAL
Definition: Defines.php:183
ApiQueryRecentChanges
A query action to enumerate the recent changes that were done to the wiki.
Definition: ApiQueryRecentChanges.php:33
ApiQueryRecentChanges\extractRowInfo
extractRowInfo( $row)
Extracts from a single sql row the data needed to describe one recent change.
Definition: ApiQueryRecentChanges.php:408
Revision\DELETED_COMMENT
const DELETED_COMMENT
Definition: Revision.php:66
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
ApiQueryLogEvents\addLogParams
static addLogParams( $result, &$vals, $params, $type, $action, $ts, $legacy=false)
Definition: ApiQueryLogEvents.php:247
ApiQueryBase\addTimestampWhereRange
addTimestampWhereRange( $field, $dir, $start, $end, $sort=true)
Add a WHERE clause corresponding to a range, similar to addWhereRange, but converts $start and $end t...
Definition: ApiQueryBase.php:240
$timestamp
if( $limit) $timestamp
Definition: importImages.php:104
ApiBase\dieUsageMsg
dieUsageMsg( $error)
Output the error message related to a certain array.
Definition: ApiBase.php:1933
wfTimestamp
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Definition: GlobalFunctions.php:2530
ApiQueryRecentChanges\getTokenFunctions
getTokenFunctions()
Get an array mapping token names to their handler functions.
Definition: ApiQueryRecentChanges.php:52
ApiQueryRecentChanges\parseRCType
parseRCType( $type)
Definition: ApiQueryRecentChanges.php:610
RC_MOVE_OVER_REDIRECT
const RC_MOVE_OVER_REDIRECT
Definition: Defines.php:182
ApiBase\PARAM_TYPE
const PARAM_TYPE
Definition: ApiBase.php:50
ApiBase\getResult
getResult()
Get the result object.
Definition: ApiBase.php:205
ApiQueryBase\select
select( $method, $extraQuery=array())
Execute a SELECT query based on the values in the internal arrays.
Definition: ApiQueryBase.php:274
token
as a message key or array as accepted by ApiBase::dieUsageMsg after processing request parameters Return false to let the request returning an error message or an< edit result="Failure"> tag if $resultArr was filled which will be used in the intoken parameter and in the and a callback function which should return the token
Definition: hooks.txt:421
RC_LOG
const RC_LOG
Definition: Defines.php:181
RC_MOVE
const RC_MOVE
Definition: Defines.php:180
ApiQueryBase\getDirectionDescription
getDirectionDescription( $p='', $extraDirText='')
Gets the personalised direction parameter description.
Definition: ApiQueryBase.php:524
ApiQueryRecentChanges\$fld_sizes
$fld_sizes
Definition: ApiQueryRecentChanges.php:41
ApiQueryRecentChanges\execute
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
Definition: ApiQueryRecentChanges.php:127
$params
$params
Definition: styleTest.css.php:40
ApiQueryRecentChanges\$fld_userid
$fld_userid
Definition: ApiQueryRecentChanges.php:39
RC_EDIT
const RC_EDIT
Definition: Defines.php:178
ContextSource\getRequest
getRequest()
Get the WebRequest object.
Definition: ContextSource.php:77
Revision\userCanBitfield
static userCanBitfield( $bitfield, $field, User $user=null)
Determine if the current user is allowed to view a particular field of this revision,...
Definition: Revision.php:1641
ApiQueryBase\addOption
addOption( $name, $value=null)
Add an option such as LIMIT or USE INDEX.
Definition: ApiQueryBase.php:252
Linker\formatComment
static formatComment( $comment, $title=null, $local=false)
This function is called by all recent changes variants, by the page history, and by the user contribu...
Definition: Linker.php:1254
ContextSource\getUser
getUser()
Get the User object.
Definition: ContextSource.php:132
ApiQueryBase\addFieldsIf
addFieldsIf( $value, $condition)
Same as addFields(), but add the fields only if a condition is met.
Definition: ApiQueryBase.php:131
ApiQueryRecentChanges\$fld_redirect
$fld_redirect
Definition: ApiQueryRecentChanges.php:41
ApiQueryGeneratorBase\setContinueEnumParameter
setContinueEnumParameter( $paramName, $paramValue)
Overrides base in case of generator & smart continue to notify ApiQueryMain instead of adding them to...
Definition: ApiQueryBase.php:676
ApiQueryRecentChanges\getAllowedParams
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
Definition: ApiQueryRecentChanges.php:656
ApiBase\PARAM_MIN
const PARAM_MIN
Definition: ApiBase.php:56
ApiQueryRecentChanges\$fld_flags
$fld_flags
Definition: ApiQueryRecentChanges.php:40
LIST_OR
const LIST_OR
Definition: Defines.php:206
DatabaseLogEntry\newFromRow
static newFromRow( $row)
Constructs new LogEntry from database result row.
Definition: LogEntry.php:163
$titles
linkcache txt The LinkCache class maintains a list of article titles and the information about whether or not the article exists in the database This is used to mark up links when displaying a page If the same link appears more than once on any page then it only has to be looked up once In most cases link lookups are done in batches with the LinkBatch class or the equivalent in so the link cache is mostly useful for short snippets of parsed and for links in the navigation areas of the skin The link cache was formerly used to track links used in a document for the purposes of updating the link tables This application is now deprecated To create a you can use the following $titles
Definition: linkcache.txt:17
ApiQueryRecentChanges\executeGenerator
executeGenerator( $resultPageSet)
Execute this module as a generator.
Definition: ApiQueryRecentChanges.php:131
ApiBase\LIMIT_BIG1
const LIMIT_BIG1
Definition: ApiBase.php:78
ApiQueryRecentChanges\$fld_title
$fld_title
Definition: ApiQueryRecentChanges.php:40
ApiQueryRecentChanges\getParamDescription
getParamDescription()
Returns an array of parameter descriptions.
Definition: ApiQueryRecentChanges.php:743
TS_ISO_8601
const TS_ISO_8601
ISO 8601 format with no timezone: 1986-02-09T20:00:00Z.
Definition: GlobalFunctions.php:2495
ApiQueryRecentChanges\$fld_parsedcomment
$fld_parsedcomment
Definition: ApiQueryRecentChanges.php:39
ApiQueryBase\getDB
getDB()
Get the Query database connection (read-only)
Definition: ApiQueryBase.php:417
ApiBase\PARAM_MAX
const PARAM_MAX
Definition: ApiBase.php:52
RecentChange\newFromRow
static newFromRow( $row)
Definition: RecentChange.php:95
wfRunHooks
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
Definition: GlobalFunctions.php:4058
ApiQueryBase\addTables
addTables( $tables, $alias=null)
Add a set of tables to the internal array.
Definition: ApiQueryBase.php:82
ApiQueryRecentChanges\$fld_user
$fld_user
Definition: ApiQueryRecentChanges.php:39
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
ApiQueryRecentChanges\getExamples
getExamples()
Returns usage examples for this module.
Definition: ApiQueryRecentChanges.php:900
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
ApiQueryRecentChanges\getPossibleErrors
getPossibleErrors()
Definition: ApiQueryRecentChanges.php:889
ApiQueryRecentChanges\getResultProperties
getResultProperties()
Returns possible properties in the result, grouped by the value of the prop parameter that shows them...
Definition: ApiQueryRecentChanges.php:783
ApiBase\PROP_TYPE
const PROP_TYPE
Definition: ApiBase.php:74
LogPage\DELETED_ACTION
const DELETED_ACTION
Definition: LogPage.php:33
ApiBase\getModulePrefix
getModulePrefix()
Get parameter prefix (usually two letters or an empty string).
Definition: ApiBase.php:165
ApiBase\extractRequestParams
extractRequestParams( $parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user,...
Definition: ApiBase.php:687
$title
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
ApiBase\dieContinueUsageIf
dieContinueUsageIf( $condition)
Die with the $prefix.
Definition: ApiBase.php:1969
ApiBase\dieUsage
dieUsage( $description, $errorCode, $httpRespCode=0, $extradata=null)
Throw a UsageException, which will (if uncaught) call the main module's error handler and die with an...
Definition: ApiBase.php:1363
ApiBase\addTokenProperties
static addTokenProperties(&$props, $tokenFunctions)
Add token properties to the array used by getResultProperties, based on a token functions mapping.
Definition: ApiBase.php:646
ApiQueryRecentChanges\initProperties
initProperties( $prop)
Sets internal state to include the desired properties in the output.
Definition: ApiQueryRecentChanges.php:110
ApiBase\PROP_NULLABLE
const PROP_NULLABLE
Definition: ApiBase.php:76
ApiQueryBase\addJoinConds
addJoinConds( $join_conds)
Add a set of JOIN conditions to the internal array.
Definition: ApiQueryBase.php:106
ApiQueryBase\addWhereFld
addWhereFld( $field, $value)
Equivalent to addWhere(array($field => $value))
Definition: ApiQueryBase.php:185
RC_NEW
const RC_NEW
Definition: Defines.php:179
$user
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
Definition: hooks.txt:237
$count
$count
Definition: UtfNormalTest2.php:96
ApiBase\setWarning
setWarning( $warning)
Set warning section for this module.
Definition: ApiBase.php:245
ApiQueryGeneratorBase
Definition: ApiQueryBase.php:626
ApiQueryRecentChanges\$fld_tags
$fld_tags
Definition: ApiQueryRecentChanges.php:42
ApiQueryRecentChanges\$fld_patrolled
$fld_patrolled
Definition: ApiQueryRecentChanges.php:41
ApiQueryRecentChanges\getHelpUrls
getHelpUrls()
Definition: ApiQueryRecentChanges.php:906
ApiBase\LIMIT_BIG2
const LIMIT_BIG2
Definition: ApiBase.php:79
ApiQueryRecentChanges\$fld_loginfo
$fld_loginfo
Definition: ApiQueryRecentChanges.php:41
LogEventsList\userCanBitfield
static userCanBitfield( $bitfield, $field, User $user=null)
Determine if the current user is allowed to view a particular field of this log row,...
Definition: LogEventsList.php:456
wfBaseConvert
wfBaseConvert( $input, $sourceBase, $destBase, $pad=1, $lowercase=true, $engine='auto')
Convert an arbitrarily-long digit string from one numeric base to another, optionally zero-padding to...
Definition: GlobalFunctions.php:3424
ApiQueryRecentChanges\$fld_timestamp
$fld_timestamp
Definition: ApiQueryRecentChanges.php:40
ApiBase\PARAM_DFLT
const PARAM_DFLT
Definition: ApiBase.php:46
as
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
ApiQueryRecentChanges\getDescription
getDescription()
Returns the description string for this module.
Definition: ApiQueryRecentChanges.php:885
ApiBase\getModuleName
getModuleName()
Get the name of the module being executed by this instance.
Definition: ApiBase.php:148
ApiBase\PARAM_ISMULTI
const PARAM_ISMULTI
Definition: ApiBase.php:48
ApiBase\PARAM_MAX2
const PARAM_MAX2
Definition: ApiBase.php:54
LogPage\DELETED_RESTRICTED
const DELETED_RESTRICTED
Definition: LogPage.php:36
ApiBase\getMain
getMain()
Get the main module.
Definition: ApiBase.php:188
ApiQueryBase\addWhere
addWhere( $value)
Add a set of WHERE clauses to the internal array.
Definition: ApiQueryBase.php:152
ChangesList\isUnpatrolled
static isUnpatrolled( $rc, User $user)
Definition: ChangesList.php:574
$t
$t
Definition: testCompression.php:65
ApiQueryRecentChanges\$token
$token
Definition: ApiQueryRecentChanges.php:42
$query
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query
Definition: hooks.txt:1105
ApiQueryRecentChanges\__construct
__construct( $query, $moduleName)
Definition: ApiQueryRecentChanges.php:35
ApiQueryBase\userCanSeeRevDel
userCanSeeRevDel()
Check whether the current user has permission to view revision-deleted fields.
Definition: ApiQueryBase.php:618
$res
$res
Definition: database.txt:21
ApiBase\dieDebug
static dieDebug( $method, $message)
Internal code errors should be reported with this method.
Definition: ApiBase.php:2010
$retval
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account incomplete not yet checked for validity & $retval
Definition: hooks.txt:237
ApiQueryRecentChanges\getCacheMode
getCacheMode( $params)
Get the cache mode for the data generated by this module.
Definition: ApiQueryRecentChanges.php:634
Revision\DELETED_TEXT
const DELETED_TEXT
Definition: Revision.php:65
ApiQueryBase\addWhereIf
addWhereIf( $value, $condition)
Same as addWhere(), but add the WHERE clauses only if a condition is met.
Definition: ApiQueryBase.php:170
ApiQueryBase\addTitleInfo
static addTitleInfo(&$arr, $title, $prefix='')
Add information (title and namespace) about a Title object to a result array.
Definition: ApiQueryBase.php:339
$type
$type
Definition: testCompression.php:46
ApiQueryRecentChanges\$fld_sha1
$fld_sha1
Definition: ApiQueryRecentChanges.php:42
ApiQueryRecentChanges\$tokenFunctions
$tokenFunctions
Definition: ApiQueryRecentChanges.php:44