MediaWiki  master
ApiQueryLogEvents.php
Go to the documentation of this file.
1 <?php
28 
35 
37  private $commentStore;
38 
41 
44 
47 
55  public function __construct(
56  ApiQuery $query,
57  $moduleName,
61  ) {
62  parent::__construct( $query, $moduleName, 'le' );
63  $this->commentStore = $commentStore;
64  $this->commentFormatter = $commentFormatter;
65  $this->changeTagDefStore = $changeTagDefStore;
66  }
67 
68  private $fld_ids = false, $fld_title = false, $fld_type = false,
69  $fld_user = false, $fld_userid = false,
70  $fld_timestamp = false, $fld_comment = false, $fld_parsedcomment = false,
71  $fld_details = false, $fld_tags = false;
72 
73  public function execute() {
74  $params = $this->extractRequestParams();
75  $db = $this->getDB();
76  $this->requireMaxOneParameter( $params, 'title', 'prefix', 'namespace' );
77 
78  $prop = array_fill_keys( $params['prop'], true );
79 
80  $this->fld_ids = isset( $prop['ids'] );
81  $this->fld_title = isset( $prop['title'] );
82  $this->fld_type = isset( $prop['type'] );
83  $this->fld_user = isset( $prop['user'] );
84  $this->fld_userid = isset( $prop['userid'] );
85  $this->fld_timestamp = isset( $prop['timestamp'] );
86  $this->fld_comment = isset( $prop['comment'] );
87  $this->fld_parsedcomment = isset( $prop['parsedcomment'] );
88  $this->fld_details = isset( $prop['details'] );
89  $this->fld_tags = isset( $prop['tags'] );
90 
91  $hideLogs = LogEventsList::getExcludeClause( $db, 'user', $this->getUser() );
92  if ( $hideLogs !== false ) {
93  $this->addWhere( $hideLogs );
94  }
95 
96  $this->addTables( [ 'logging', 'actor', 'page' ] );
97  $this->addJoinConds( [
98  'actor' => [ 'JOIN', 'actor_id=log_actor' ],
99  'page' => [ 'LEFT JOIN',
100  [ 'log_namespace=page_namespace',
101  'log_title=page_title' ] ] ] );
102 
103  $this->addFields( [
104  'log_id',
105  'log_type',
106  'log_action',
107  'log_timestamp',
108  'log_deleted',
109  ] );
110 
111  $this->addFieldsIf( 'page_id', $this->fld_ids );
112  // log_page is the page_id saved at log time, whereas page_id is from a
113  // join at query time. This leads to different results in various
114  // scenarios, e.g. deletion, recreation.
115  $this->addFieldsIf( 'log_page', $this->fld_ids );
116  $this->addFieldsIf( [ 'actor_name', 'actor_user' ], $this->fld_user );
117  $this->addFieldsIf( 'actor_user', $this->fld_userid );
118  $this->addFieldsIf(
119  [ 'log_namespace', 'log_title' ],
120  $this->fld_title || $this->fld_parsedcomment
121  );
122  $this->addFieldsIf( 'log_params', $this->fld_details );
123 
124  if ( $this->fld_comment || $this->fld_parsedcomment ) {
125  $commentQuery = $this->commentStore->getJoin( 'log_comment' );
126  $this->addTables( $commentQuery['tables'] );
127  $this->addFields( $commentQuery['fields'] );
128  $this->addJoinConds( $commentQuery['joins'] );
129  }
130 
131  if ( $this->fld_tags ) {
132  $this->addFields( [ 'ts_tags' => ChangeTags::makeTagSummarySubquery( 'logging' ) ] );
133  }
134 
135  if ( $params['tag'] !== null ) {
136  $this->addTables( 'change_tag' );
137  $this->addJoinConds( [ 'change_tag' => [ 'JOIN',
138  [ 'log_id=ct_log_id' ] ] ] );
139  try {
140  $this->addWhereFld( 'ct_tag_id', $this->changeTagDefStore->getId( $params['tag'] ) );
141  } catch ( NameTableAccessException $exception ) {
142  // Return nothing.
143  $this->addWhere( '1=0' );
144  }
145  }
146 
147  if ( $params['action'] !== null ) {
148  // Do validation of action param, list of allowed actions can contains wildcards
149  // Allow the param, when the actions is in the list or a wildcard version is listed.
150  $logAction = $params['action'];
151  if ( strpos( $logAction, '/' ) === false ) {
152  // all items in the list have a slash
153  $valid = false;
154  } else {
155  $logActions = array_fill_keys( $this->getAllowedLogActions(), true );
156  list( $type, $action ) = explode( '/', $logAction, 2 );
157  $valid = isset( $logActions[$logAction] ) || isset( $logActions[$type . '/*'] );
158  }
159 
160  if ( !$valid ) {
161  $encParamName = $this->encodeParamName( 'action' );
162  $this->dieWithError(
163  [ 'apierror-unrecognizedvalue', $encParamName, wfEscapeWikiText( $logAction ) ],
164  "unknown_$encParamName"
165  );
166  }
167 
168  $this->addWhereFld( 'log_type', $type );
169  $this->addWhereFld( 'log_action', $action );
170  } elseif ( $params['type'] !== null ) {
171  $this->addWhereFld( 'log_type', $params['type'] );
172  }
173 
174  $this->addTimestampWhereRange(
175  'log_timestamp',
176  $params['dir'],
177  $params['start'],
178  $params['end']
179  );
180  // Include in ORDER BY for uniqueness
181  $this->addWhereRange( 'log_id', $params['dir'], null, null );
182 
183  if ( $params['continue'] !== null ) {
184  $cont = explode( '|', $params['continue'] );
185  $this->dieContinueUsageIf( count( $cont ) != 2 );
186  $op = ( $params['dir'] === 'newer' ? '>' : '<' );
187  $continueTimestamp = $db->addQuotes( $db->timestamp( $cont[0] ) );
188  $continueId = (int)$cont[1];
189  $this->dieContinueUsageIf( $continueId != $cont[1] );
190  $this->addWhere( "log_timestamp $op $continueTimestamp OR " .
191  "(log_timestamp = $continueTimestamp AND " .
192  "log_id $op= $continueId)"
193  );
194  }
195 
196  $limit = $params['limit'];
197  $this->addOption( 'LIMIT', $limit + 1 );
198 
199  $user = $params['user'];
200  if ( $user !== null ) {
201  $this->addWhereFld( 'actor_name', $user );
202  }
203 
204  $title = $params['title'];
205  if ( $title !== null ) {
206  $titleObj = Title::newFromText( $title );
207  if ( $titleObj === null ) {
208  $this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $title ) ] );
209  }
210  $this->addWhereFld( 'log_namespace', $titleObj->getNamespace() );
211  $this->addWhereFld( 'log_title', $titleObj->getDBkey() );
212  }
213 
214  if ( $params['namespace'] !== null ) {
215  $this->addWhereFld( 'log_namespace', $params['namespace'] );
216  }
217 
218  $prefix = $params['prefix'];
219 
220  if ( $prefix !== null ) {
221  if ( $this->getConfig()->get( 'MiserMode' ) ) {
222  $this->dieWithError( 'apierror-prefixsearchdisabled' );
223  }
224 
225  $title = Title::newFromText( $prefix );
226  if ( $title === null ) {
227  $this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $prefix ) ] );
228  }
229  $this->addWhereFld( 'log_namespace', $title->getNamespace() );
230  $this->addWhere( 'log_title ' . $db->buildLike( $title->getDBkey(), $db->anyString() ) );
231  }
232 
233  // Paranoia: avoid brute force searches (T19342)
234  if ( $params['namespace'] !== null || $title !== null || $user !== null ) {
235  if ( !$this->getAuthority()->isAllowed( 'deletedhistory' ) ) {
236  $titleBits = LogPage::DELETED_ACTION;
237  $userBits = LogPage::DELETED_USER;
238  } elseif ( !$this->getAuthority()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
241  } else {
242  $titleBits = 0;
243  $userBits = 0;
244  }
245  if ( ( $params['namespace'] !== null || $title !== null ) && $titleBits ) {
246  $this->addWhere( $db->bitAnd( 'log_deleted', $titleBits ) . " != $titleBits" );
247  }
248  if ( $user !== null && $userBits ) {
249  $this->addWhere( $db->bitAnd( 'log_deleted', $userBits ) . " != $userBits" );
250  }
251  }
252 
253  // T220999: MySQL/MariaDB (10.1.37) can sometimes irrationally decide that querying `actor` before
254  // `logging` and filesorting is somehow better than querying $limit+1 rows from `logging`.
255  // Tell it not to reorder the query. But not when `letag` was used, as it seems as likely
256  // to be harmed as helped in that case.
257  // If "user" was specified, it's obviously correct to query actor first (T282122)
258  if ( $params['tag'] === null && $user === null ) {
259  $this->addOption( 'STRAIGHT_JOIN' );
260  }
261 
262  $this->addOption(
263  'MAX_EXECUTION_TIME',
264  $this->getConfig()->get( 'MaxExecutionTimeForExpensiveQueries' )
265  );
266 
267  $count = 0;
268  $res = $this->select( __METHOD__ );
269 
270  if ( $this->fld_title ) {
271  $this->executeGenderCacheFromResultWrapper( $res, __METHOD__, 'log' );
272  }
273  if ( $this->fld_parsedcomment ) {
274  $this->formattedComments = $this->commentFormatter->formatItems(
275  $this->commentFormatter->rows( $res )
276  ->commentKey( 'log_comment' )
277  ->indexField( 'log_id' )
278  ->namespaceField( 'log_namespace' )
279  ->titleField( 'log_title' )
280  );
281  }
282 
283  $result = $this->getResult();
284  foreach ( $res as $row ) {
285  if ( ++$count > $limit ) {
286  // We've reached the one extra which shows that there are
287  // additional pages to be had. Stop here...
288  $this->setContinueEnumParameter( 'continue', "$row->log_timestamp|$row->log_id" );
289  break;
290  }
291 
292  $vals = $this->extractRowInfo( $row );
293  $fit = $result->addValue( [ 'query', $this->getModuleName() ], null, $vals );
294  if ( !$fit ) {
295  $this->setContinueEnumParameter( 'continue', "$row->log_timestamp|$row->log_id" );
296  break;
297  }
298  }
299  $result->addIndexedTagName( [ 'query', $this->getModuleName() ], 'item' );
300  }
301 
302  private function extractRowInfo( $row ) {
303  $logEntry = DatabaseLogEntry::newFromRow( $row );
304  $vals = [
305  ApiResult::META_TYPE => 'assoc',
306  ];
307  $anyHidden = false;
308  $user = $this->getUser();
309 
310  if ( $this->fld_ids ) {
311  $vals['logid'] = (int)$row->log_id;
312  }
313 
314  if ( $this->fld_title ) {
315  $title = Title::makeTitle( $row->log_namespace, $row->log_title );
316  }
317 
318  if ( $this->fld_title || $this->fld_ids || $this->fld_details && $row->log_params !== '' ) {
320  $vals['actionhidden'] = true;
321  $anyHidden = true;
322  }
323  if ( LogEventsList::userCan( $row, LogPage::DELETED_ACTION, $user ) ) {
324  if ( $this->fld_title ) {
326  }
327  if ( $this->fld_ids ) {
328  $vals['pageid'] = (int)$row->page_id;
329  $vals['logpage'] = (int)$row->log_page;
330  }
331  if ( $this->fld_details ) {
332  $vals['params'] = LogFormatter::newFromEntry( $logEntry )->formatParametersForApi();
333  }
334  }
335  }
336 
337  if ( $this->fld_type ) {
338  $vals['type'] = $row->log_type;
339  $vals['action'] = $row->log_action;
340  }
341 
342  if ( $this->fld_user || $this->fld_userid ) {
344  $vals['userhidden'] = true;
345  $anyHidden = true;
346  }
347  if ( LogEventsList::userCan( $row, LogPage::DELETED_USER, $user ) ) {
348  if ( $this->fld_user ) {
349  $vals['user'] = $row->actor_name;
350  }
351  if ( $this->fld_userid ) {
352  $vals['userid'] = (int)$row->actor_user;
353  }
354 
355  if ( !$row->actor_user ) {
356  $vals['anon'] = true;
357  }
358  }
359  }
360  if ( $this->fld_timestamp ) {
361  $vals['timestamp'] = wfTimestamp( TS_ISO_8601, $row->log_timestamp );
362  }
363 
364  if ( $this->fld_comment || $this->fld_parsedcomment ) {
366  $vals['commenthidden'] = true;
367  $anyHidden = true;
368  }
369  if ( LogEventsList::userCan( $row, LogPage::DELETED_COMMENT, $user ) ) {
370  if ( $this->fld_comment ) {
371  $vals['comment'] = $this->commentStore->getComment( 'log_comment', $row )->text;
372  }
373 
374  if ( $this->fld_parsedcomment ) {
375  // @phan-suppress-next-line PhanTypeArraySuspiciousNullable
376  $vals['parsedcomment'] = $this->formattedComments[$row->log_id];
377  }
378  }
379  }
380 
381  if ( $this->fld_tags ) {
382  if ( $row->ts_tags ) {
383  $tags = explode( ',', $row->ts_tags );
384  ApiResult::setIndexedTagName( $tags, 'tag' );
385  $vals['tags'] = $tags;
386  } else {
387  $vals['tags'] = [];
388  }
389  }
390 
391  if ( $anyHidden && LogEventsList::isDeleted( $row, LogPage::DELETED_RESTRICTED ) ) {
392  $vals['suppressed'] = true;
393  }
394 
395  return $vals;
396  }
397 
401  private function getAllowedLogActions() {
402  $config = $this->getConfig();
403  return array_keys( array_merge(
404  $config->get( 'LogActions' ),
405  $config->get( 'LogActionsHandlers' )
406  ) );
407  }
408 
409  public function getCacheMode( $params ) {
410  if ( $this->userCanSeeRevDel() ) {
411  return 'private';
412  }
413  if ( $params['prop'] !== null && in_array( 'parsedcomment', $params['prop'] ) ) {
414  // formatComment() calls wfMessage() among other things
415  return 'anon-public-user-private';
416  } elseif ( LogEventsList::getExcludeClause( $this->getDB(), 'user', $this->getUser() )
417  === LogEventsList::getExcludeClause( $this->getDB(), 'public' )
418  ) { // Output can only contain public data.
419  return 'public';
420  } else {
421  return 'anon-public-user-private';
422  }
423  }
424 
425  public function getAllowedParams( $flags = 0 ) {
426  $config = $this->getConfig();
427  if ( $flags & ApiBase::GET_VALUES_FOR_HELP ) {
428  $logActions = $this->getAllowedLogActions();
429  sort( $logActions );
430  } else {
431  $logActions = null;
432  }
433  $ret = [
434  'prop' => [
435  ApiBase::PARAM_ISMULTI => true,
436  ApiBase::PARAM_DFLT => 'ids|title|type|user|timestamp|comment|details',
438  'ids',
439  'title',
440  'type',
441  'user',
442  'userid',
443  'timestamp',
444  'comment',
445  'parsedcomment',
446  'details',
447  'tags'
448  ],
450  ],
451  'type' => [
453  ],
454  'action' => [
455  // validation on request is done in execute()
456  ApiBase::PARAM_TYPE => $logActions
457  ],
458  'start' => [
459  ApiBase::PARAM_TYPE => 'timestamp'
460  ],
461  'end' => [
462  ApiBase::PARAM_TYPE => 'timestamp'
463  ],
464  'dir' => [
465  ApiBase::PARAM_DFLT => 'older',
467  'newer',
468  'older'
469  ],
470  ApiBase::PARAM_HELP_MSG => 'api-help-param-direction',
471  ],
472  'user' => [
473  ApiBase::PARAM_TYPE => 'user',
474  UserDef::PARAM_ALLOWED_USER_TYPES => [ 'name', 'ip', 'id', 'interwiki' ],
475  ],
476  'title' => null,
477  'namespace' => [
478  ApiBase::PARAM_TYPE => 'namespace',
480  ],
481  'prefix' => [],
482  'tag' => null,
483  'limit' => [
484  ApiBase::PARAM_DFLT => 10,
485  ApiBase::PARAM_TYPE => 'limit',
486  ApiBase::PARAM_MIN => 1,
489  ],
490  'continue' => [
491  ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
492  ],
493  ];
494 
495  if ( $config->get( 'MiserMode' ) ) {
496  $ret['prefix'][ApiBase::PARAM_HELP_MSG] = 'api-help-param-disabled-in-miser-mode';
497  }
498 
499  return $ret;
500  }
501 
502  protected function getExamplesMessages() {
503  return [
504  'action=query&list=logevents'
505  => 'apihelp-query+logevents-example-simple',
506  ];
507  }
508 
509  public function getHelpUrls() {
510  return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Logevents';
511  }
512 }
ContextSource\getConfig
getConfig()
Definition: ContextSource.php:72
ChangeTags\makeTagSummarySubquery
static makeTagSummarySubquery( $tables)
Make the tag summary subquery based on the given tables and return it.
Definition: ChangeTags.php:999
Title\newFromText
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
Definition: Title.php:377
ApiQueryBase\addFields
addFields( $value)
Add a set of fields to select to the internal array.
Definition: ApiQueryBase.php:212
LogPage\validTypes
static validTypes()
Get the list of valid log types.
Definition: LogPage.php:208
ApiQuery
This is the main query class.
Definition: ApiQuery.php:39
ApiQueryLogEvents\getExamplesMessages
getExamplesMessages()
Returns usage examples for this module.
Definition: ApiQueryLogEvents.php:502
ApiResult\META_TYPE
const META_TYPE
Key for the 'type' metadata item.
Definition: ApiResult.php:110
ApiBase\dieWithError
dieWithError( $msg, $code=null, $data=null, $httpCode=null)
Abort execution with an error.
Definition: ApiBase.php:1436
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:366
ApiBase\PARAM_HELP_MSG
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
Definition: ApiBase.php:162
wfTimestamp
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Definition: GlobalFunctions.php:1649
ApiBase\PARAM_TYPE
const PARAM_TYPE
Definition: ApiBase.php:81
ApiQueryLogEvents\$fld_comment
$fld_comment
Definition: ApiQueryLogEvents.php:70
ApiBase\getResult
getResult()
Get the result object.
Definition: ApiBase.php:628
LogEventsList\userCan
static userCan( $row, $field, Authority $performer)
Determine if the current user is allowed to view a particular field of this log row,...
Definition: LogEventsList.php:521
CommentStore
Handle database storage of comments such as edit summaries and log reasons.
Definition: CommentStore.php:42
ApiQueryLogEvents\$fld_userid
$fld_userid
Definition: ApiQueryLogEvents.php:69
LogEventsList\getExcludeClause
static getExcludeClause( $db, $audience='public', Authority $performer=null)
SQL clause to skip forbidden log types for this user.
Definition: LogEventsList.php:786
ApiQueryLogEvents\$changeTagDefStore
NameTableStore $changeTagDefStore
Definition: ApiQueryLogEvents.php:43
ApiQueryBase\addOption
addOption( $name, $value=null)
Add an option such as LIMIT or USE INDEX.
Definition: ApiQueryBase.php:378
$res
$res
Definition: testCompression.php:57
ContextSource\getUser
getUser()
Definition: ContextSource.php:136
MediaWiki\CommentFormatter\CommentFormatter
This is the main service interface for converting single-line comments from various DB comment fields...
Definition: CommentFormatter.php:16
ApiQueryLogEvents\$fld_timestamp
$fld_timestamp
Definition: ApiQueryLogEvents.php:70
ApiQueryLogEvents
Query action to List the log events, with optional filtering by various parameters.
Definition: ApiQueryLogEvents.php:34
ApiQueryBase\addFieldsIf
addFieldsIf( $value, $condition)
Same as addFields(), but add the fields only if a condition is met.
Definition: ApiQueryBase.php:222
ApiQueryLogEvents\__construct
__construct(ApiQuery $query, $moduleName, CommentStore $commentStore, RowCommentFormatter $commentFormatter, NameTableStore $changeTagDefStore)
Definition: ApiQueryLogEvents.php:55
Wikimedia\ParamValidator\ParamValidator::TypeDef\UserDef
Type definition for user types.
Definition: UserDef.php:26
NS_SPECIAL
const NS_SPECIAL
Definition: Defines.php:53
ApiBase\PARAM_MIN
const PARAM_MIN
Definition: ApiBase.php:93
ApiQueryLogEvents\$fld_details
$fld_details
Definition: ApiQueryLogEvents.php:71
ApiQueryBase\executeGenderCacheFromResultWrapper
executeGenderCacheFromResultWrapper(IResultWrapper $res, $fname=__METHOD__, $fieldPrefix='page')
Preprocess the result set to fill the GenderCache with the necessary information before using self::a...
Definition: ApiQueryBase.php:626
DatabaseLogEntry\newFromRow
static newFromRow( $row)
Constructs new LogEntry from database result row.
Definition: DatabaseLogEntry.php:97
LogPage\DELETED_COMMENT
const DELETED_COMMENT
Definition: LogPage.php:40
ApiQueryLogEvents\getAllowedParams
getAllowedParams( $flags=0)
Definition: ApiQueryLogEvents.php:425
LogPage\DELETED_USER
const DELETED_USER
Definition: LogPage.php:41
ApiQueryLogEvents\$commentFormatter
CommentFormatter $commentFormatter
Definition: ApiQueryLogEvents.php:40
ApiQueryBase
This is a base class for all Query modules.
Definition: ApiQueryBase.php:37
ApiBase\LIMIT_BIG1
const LIMIT_BIG1
Fast query, standard limit.
Definition: ApiBase.php:220
ApiQueryBase\getDB
getDB()
Get the Query database connection (read-only)
Definition: ApiQueryBase.php:117
ApiBase\PARAM_MAX
const PARAM_MAX
Definition: ApiBase.php:85
ApiQueryBase\addTables
addTables( $tables, $alias=null)
Add a set of tables to the internal array.
Definition: ApiQueryBase.php:182
ApiQueryBase\select
select( $method, $extraQuery=[], array &$hookData=null)
Execute a SELECT query based on the values in the internal arrays.
Definition: ApiQueryBase.php:399
ApiBase\extractRequestParams
extractRequestParams( $options=[])
Using getAllowedParams(), this function makes an array of the values provided by the user,...
Definition: ApiBase.php:764
$title
$title
Definition: testCompression.php:38
Title\makeTitle
static makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:648
ApiQueryLogEvents\$fld_type
$fld_type
Definition: ApiQueryLogEvents.php:68
ApiBase\PARAM_EXTRA_NAMESPACES
const PARAM_EXTRA_NAMESPACES
Definition: ApiBase.php:121
ApiQueryLogEvents\getHelpUrls
getHelpUrls()
Return links to more detailed help pages about the module.
Definition: ApiQueryLogEvents.php:509
LogPage\DELETED_ACTION
const DELETED_ACTION
Definition: LogPage.php:39
ApiQueryBase\addWhereRange
addWhereRange( $field, $dir, $start, $end, $sort=true)
Add a WHERE clause corresponding to a range, and an ORDER BY clause to sort in the right direction.
Definition: ApiQueryBase.php:337
ApiResult\setIndexedTagName
static setIndexedTagName(array &$arr, $tag)
Set the tag name for numeric-keyed values in XML format.
Definition: ApiResult.php:604
NS_MEDIA
const NS_MEDIA
Definition: Defines.php:52
ApiBase\requireMaxOneParameter
requireMaxOneParameter( $params,... $required)
Die if more than one of a certain set of parameters is set and not false.
Definition: ApiBase.php:936
ApiQueryLogEvents\$fld_title
$fld_title
Definition: ApiQueryLogEvents.php:68
ApiBase\dieContinueUsageIf
dieContinueUsageIf( $condition)
Die with the 'badcontinue' error.
Definition: ApiBase.php:1626
ContextSource\getAuthority
getAuthority()
Definition: ContextSource.php:144
ApiBase\encodeParamName
encodeParamName( $paramName)
This method mangles parameter name based on the prefix supplied to the constructor.
Definition: ApiBase.php:742
ApiBase\GET_VALUES_FOR_HELP
const GET_VALUES_FOR_HELP
getAllowedParams() flag: When set, the result could take longer to generate, but should be more thoro...
Definition: ApiBase.php:233
ApiQueryLogEvents\$fld_parsedcomment
$fld_parsedcomment
Definition: ApiQueryLogEvents.php:70
ApiQueryBase\addJoinConds
addJoinConds( $join_conds)
Add a set of JOIN conditions to the internal array.
Definition: ApiQueryBase.php:201
wfEscapeWikiText
wfEscapeWikiText( $text)
Escapes the given text so that it may be output using addWikiText() without any linking,...
Definition: GlobalFunctions.php:1440
ApiQueryBase\addWhereFld
addWhereFld( $field, $value)
Equivalent to addWhere( [ $field => $value ] )
Definition: ApiQueryBase.php:282
MediaWiki\Storage\NameTableStore
Definition: NameTableStore.php:36
ApiQueryLogEvents\$formattedComments
string[] null $formattedComments
Definition: ApiQueryLogEvents.php:46
ApiQueryLogEvents\extractRowInfo
extractRowInfo( $row)
Definition: ApiQueryLogEvents.php:302
MediaWiki\CommentFormatter\RowCommentFormatter
This is basically a CommentFormatter with a CommentStore dependency, allowing it to retrieve comment ...
Definition: RowCommentFormatter.php:15
ApiBase\LIMIT_BIG2
const LIMIT_BIG2
Fast query, apihighlimits limit.
Definition: ApiBase.php:222
ApiQueryLogEvents\$fld_user
$fld_user
Definition: ApiQueryLogEvents.php:69
ApiBase\PARAM_DFLT
const PARAM_DFLT
Definition: ApiBase.php:73
LogEventsList\isDeleted
static isDeleted( $row, $field)
Definition: LogEventsList.php:568
ApiBase\getModuleName
getModuleName()
Get the name of the module being executed by this instance.
Definition: ApiBase.php:497
MediaWiki\Storage\NameTableAccessException
Exception representing a failure to look up a row from a name table.
Definition: NameTableAccessException.php:33
ApiBase\PARAM_ISMULTI
const PARAM_ISMULTI
Definition: ApiBase.php:77
ApiQueryLogEvents\getCacheMode
getCacheMode( $params)
Get the cache mode for the data generated by this module.
Definition: ApiQueryLogEvents.php:409
ApiBase\PARAM_MAX2
const PARAM_MAX2
Definition: ApiBase.php:89
ApiQueryLogEvents\execute
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
Definition: ApiQueryLogEvents.php:73
LogPage\DELETED_RESTRICTED
const DELETED_RESTRICTED
Definition: LogPage.php:42
ApiQueryLogEvents\$commentStore
CommentStore $commentStore
Definition: ApiQueryLogEvents.php:37
ApiQueryBase\addWhere
addWhere( $value)
Add a set of WHERE clauses to the internal array.
Definition: ApiQueryBase.php:245
ApiQueryBase\setContinueEnumParameter
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
Definition: ApiQueryBase.php:515
ApiQueryLogEvents\$fld_tags
$fld_tags
Definition: ApiQueryLogEvents.php:71
ApiBase\PARAM_HELP_MSG_PER_VALUE
const PARAM_HELP_MSG_PER_VALUE
((string|array|Message)[]) When PARAM_TYPE is an array, this is an array mapping those values to $msg...
Definition: ApiBase.php:195
ApiQueryBase\userCanSeeRevDel
userCanSeeRevDel()
Check whether the current user has permission to view revision-deleted fields.
Definition: ApiQueryBase.php:607
ApiQueryLogEvents\$fld_ids
$fld_ids
Definition: ApiQueryLogEvents.php:68
ApiQueryLogEvents\getAllowedLogActions
getAllowedLogActions()
Definition: ApiQueryLogEvents.php:401
ApiQueryBase\addTitleInfo
static addTitleInfo(&$arr, $title, $prefix='')
Add information (title and namespace) about a Title object to a result array.
Definition: ApiQueryBase.php:466
LogFormatter\newFromEntry
static newFromEntry(LogEntry $entry)
Constructs a new formatter suitable for given entry.
Definition: LogFormatter.php:55
$type
$type
Definition: testCompression.php:52