MediaWiki  master
ApiQueryLogEvents.php
Go to the documentation of this file.
1 <?php
26 
33 
35  private $commentStore;
36 
42  public function __construct(
43  ApiQuery $query,
44  $moduleName,
46  ) {
47  parent::__construct( $query, $moduleName, 'le' );
48  $this->commentStore = $commentStore;
49  }
50 
51  private $fld_ids = false, $fld_title = false, $fld_type = false,
52  $fld_user = false, $fld_userid = false,
53  $fld_timestamp = false, $fld_comment = false, $fld_parsedcomment = false,
54  $fld_details = false, $fld_tags = false;
55 
56  public function execute() {
57  $params = $this->extractRequestParams();
58  $db = $this->getDB();
59  $this->requireMaxOneParameter( $params, 'title', 'prefix', 'namespace' );
60 
61  $prop = array_fill_keys( $params['prop'], true );
62 
63  $this->fld_ids = isset( $prop['ids'] );
64  $this->fld_title = isset( $prop['title'] );
65  $this->fld_type = isset( $prop['type'] );
66  $this->fld_user = isset( $prop['user'] );
67  $this->fld_userid = isset( $prop['userid'] );
68  $this->fld_timestamp = isset( $prop['timestamp'] );
69  $this->fld_comment = isset( $prop['comment'] );
70  $this->fld_parsedcomment = isset( $prop['parsedcomment'] );
71  $this->fld_details = isset( $prop['details'] );
72  $this->fld_tags = isset( $prop['tags'] );
73 
74  $hideLogs = LogEventsList::getExcludeClause( $db, 'user', $this->getUser() );
75  if ( $hideLogs !== false ) {
76  $this->addWhere( $hideLogs );
77  }
78 
79  $this->addTables( [ 'logging', 'actor', 'page' ] );
80  $this->addJoinConds( [
81  'actor' => [ 'JOIN', 'actor_id=log_actor' ],
82  'page' => [ 'LEFT JOIN',
83  [ 'log_namespace=page_namespace',
84  'log_title=page_title' ] ] ] );
85 
86  $this->addFields( [
87  'log_id',
88  'log_type',
89  'log_action',
90  'log_timestamp',
91  'log_deleted',
92  ] );
93 
94  $this->addFieldsIf( 'page_id', $this->fld_ids );
95  // log_page is the page_id saved at log time, whereas page_id is from a
96  // join at query time. This leads to different results in various
97  // scenarios, e.g. deletion, recreation.
98  $this->addFieldsIf( 'log_page', $this->fld_ids );
99  $this->addFieldsIf( [ 'actor_name', 'actor_user' ], $this->fld_user );
100  $this->addFieldsIf( 'actor_user', $this->fld_userid );
101  $this->addFieldsIf(
102  [ 'log_namespace', 'log_title' ],
103  $this->fld_title || $this->fld_parsedcomment
104  );
105  $this->addFieldsIf( 'log_params', $this->fld_details );
106 
107  if ( $this->fld_comment || $this->fld_parsedcomment ) {
108  $commentQuery = $this->commentStore->getJoin( 'log_comment' );
109  $this->addTables( $commentQuery['tables'] );
110  $this->addFields( $commentQuery['fields'] );
111  $this->addJoinConds( $commentQuery['joins'] );
112  }
113 
114  if ( $this->fld_tags ) {
115  $this->addFields( [ 'ts_tags' => ChangeTags::makeTagSummarySubquery( 'logging' ) ] );
116  }
117 
118  if ( $params['tag'] !== null ) {
119  $this->addTables( 'change_tag' );
120  $this->addJoinConds( [ 'change_tag' => [ 'JOIN',
121  [ 'log_id=ct_log_id' ] ] ] );
122  $changeTagDefStore = MediaWikiServices::getInstance()->getChangeTagDefStore();
123  try {
124  $this->addWhereFld( 'ct_tag_id', $changeTagDefStore->getId( $params['tag'] ) );
125  } catch ( NameTableAccessException $exception ) {
126  // Return nothing.
127  $this->addWhere( '1=0' );
128  }
129  }
130 
131  if ( $params['action'] !== null ) {
132  // Do validation of action param, list of allowed actions can contains wildcards
133  // Allow the param, when the actions is in the list or a wildcard version is listed.
134  $logAction = $params['action'];
135  if ( strpos( $logAction, '/' ) === false ) {
136  // all items in the list have a slash
137  $valid = false;
138  } else {
139  $logActions = array_fill_keys( $this->getAllowedLogActions(), true );
140  list( $type, $action ) = explode( '/', $logAction, 2 );
141  $valid = isset( $logActions[$logAction] ) || isset( $logActions[$type . '/*'] );
142  }
143 
144  if ( !$valid ) {
145  $encParamName = $this->encodeParamName( 'action' );
146  $this->dieWithError(
147  [ 'apierror-unrecognizedvalue', $encParamName, wfEscapeWikiText( $logAction ) ],
148  "unknown_$encParamName"
149  );
150  }
151 
152  $this->addWhereFld( 'log_type', $type );
153  $this->addWhereFld( 'log_action', $action );
154  } elseif ( $params['type'] !== null ) {
155  $this->addWhereFld( 'log_type', $params['type'] );
156  }
157 
158  $this->addTimestampWhereRange(
159  'log_timestamp',
160  $params['dir'],
161  $params['start'],
162  $params['end']
163  );
164  // Include in ORDER BY for uniqueness
165  $this->addWhereRange( 'log_id', $params['dir'], null, null );
166 
167  if ( $params['continue'] !== null ) {
168  $cont = explode( '|', $params['continue'] );
169  $this->dieContinueUsageIf( count( $cont ) != 2 );
170  $op = ( $params['dir'] === 'newer' ? '>' : '<' );
171  $continueTimestamp = $db->addQuotes( $db->timestamp( $cont[0] ) );
172  $continueId = (int)$cont[1];
173  $this->dieContinueUsageIf( $continueId != $cont[1] );
174  $this->addWhere( "log_timestamp $op $continueTimestamp OR " .
175  "(log_timestamp = $continueTimestamp AND " .
176  "log_id $op= $continueId)"
177  );
178  }
179 
180  $limit = $params['limit'];
181  $this->addOption( 'LIMIT', $limit + 1 );
182 
183  $user = $params['user'];
184  if ( $user !== null ) {
185  $this->addWhereFld( 'actor_name', $user );
186 
187  // Remove after T270620 is resolved.
188  $index = $db->indexExists( 'logging', 'times', __METHOD__ ) ? 'times' : 'log_times';
189 
190  // T71222: MariaDB's optimizer, at least 10.1.37 and .38, likes to choose a wildly bad plan for
191  // some reason for this code path. Tell it not to use the wrong index it wants to pick.
192  $this->addOption( 'IGNORE INDEX', [ 'logging' => [ $index ] ] );
193  }
194 
195  $title = $params['title'];
196  if ( $title !== null ) {
197  $titleObj = Title::newFromText( $title );
198  if ( $titleObj === null ) {
199  $this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $title ) ] );
200  }
201  $this->addWhereFld( 'log_namespace', $titleObj->getNamespace() );
202  $this->addWhereFld( 'log_title', $titleObj->getDBkey() );
203  }
204 
205  if ( $params['namespace'] !== null ) {
206  $this->addWhereFld( 'log_namespace', $params['namespace'] );
207  }
208 
209  $prefix = $params['prefix'];
210 
211  if ( $prefix !== null ) {
212  if ( $this->getConfig()->get( 'MiserMode' ) ) {
213  $this->dieWithError( 'apierror-prefixsearchdisabled' );
214  }
215 
216  $title = Title::newFromText( $prefix );
217  if ( $title === null ) {
218  $this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $prefix ) ] );
219  }
220  $this->addWhereFld( 'log_namespace', $title->getNamespace() );
221  $this->addWhere( 'log_title ' . $db->buildLike( $title->getDBkey(), $db->anyString() ) );
222  }
223 
224  // Paranoia: avoid brute force searches (T19342)
225  if ( $params['namespace'] !== null || $title !== null || $user !== null ) {
226  if ( !$this->getAuthority()->isAllowed( 'deletedhistory' ) ) {
227  $titleBits = LogPage::DELETED_ACTION;
228  $userBits = LogPage::DELETED_USER;
229  } elseif ( !$this->getAuthority()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
232  } else {
233  $titleBits = 0;
234  $userBits = 0;
235  }
236  if ( ( $params['namespace'] !== null || $title !== null ) && $titleBits ) {
237  $this->addWhere( $db->bitAnd( 'log_deleted', $titleBits ) . " != $titleBits" );
238  }
239  if ( $user !== null && $userBits ) {
240  $this->addWhere( $db->bitAnd( 'log_deleted', $userBits ) . " != $userBits" );
241  }
242  }
243 
244  // T220999: MySQL/MariaDB (10.1.37) can sometimes irrationally decide that querying `actor` before
245  // `logging` and filesorting is somehow better than querying $limit+1 rows from `logging`.
246  // Tell it not to reorder the query. But not when `letag` was used, as it seems as likely
247  // to be harmed as helped in that case.
248  // If "user" was specified, it's obviously correct to query actor first (T282122)
249  if ( $params['tag'] === null && $user === null ) {
250  $this->addOption( 'STRAIGHT_JOIN' );
251  }
252 
253  $count = 0;
254  $res = $this->select( __METHOD__ );
255 
256  if ( $this->fld_title ) {
257  $this->executeGenderCacheFromResultWrapper( $res, __METHOD__, 'log' );
258  }
259 
260  $result = $this->getResult();
261  foreach ( $res as $row ) {
262  if ( ++$count > $limit ) {
263  // We've reached the one extra which shows that there are
264  // additional pages to be had. Stop here...
265  $this->setContinueEnumParameter( 'continue', "$row->log_timestamp|$row->log_id" );
266  break;
267  }
268 
269  $vals = $this->extractRowInfo( $row );
270  $fit = $result->addValue( [ 'query', $this->getModuleName() ], null, $vals );
271  if ( !$fit ) {
272  $this->setContinueEnumParameter( 'continue', "$row->log_timestamp|$row->log_id" );
273  break;
274  }
275  }
276  $result->addIndexedTagName( [ 'query', $this->getModuleName() ], 'item' );
277  }
278 
279  private function extractRowInfo( $row ) {
280  $logEntry = DatabaseLogEntry::newFromRow( $row );
281  $vals = [
282  ApiResult::META_TYPE => 'assoc',
283  ];
284  $anyHidden = false;
285  $user = $this->getUser();
286 
287  if ( $this->fld_ids ) {
288  $vals['logid'] = (int)$row->log_id;
289  }
290 
291  if ( $this->fld_title || $this->fld_parsedcomment ) {
292  $title = Title::makeTitle( $row->log_namespace, $row->log_title );
293  }
294 
295  if ( $this->fld_title || $this->fld_ids || $this->fld_details && $row->log_params !== '' ) {
297  $vals['actionhidden'] = true;
298  $anyHidden = true;
299  }
300  if ( LogEventsList::userCan( $row, LogPage::DELETED_ACTION, $user ) ) {
301  if ( $this->fld_title ) {
303  }
304  if ( $this->fld_ids ) {
305  $vals['pageid'] = (int)$row->page_id;
306  $vals['logpage'] = (int)$row->log_page;
307  }
308  if ( $this->fld_details ) {
309  $vals['params'] = LogFormatter::newFromEntry( $logEntry )->formatParametersForApi();
310  }
311  }
312  }
313 
314  if ( $this->fld_type ) {
315  $vals['type'] = $row->log_type;
316  $vals['action'] = $row->log_action;
317  }
318 
319  if ( $this->fld_user || $this->fld_userid ) {
321  $vals['userhidden'] = true;
322  $anyHidden = true;
323  }
324  if ( LogEventsList::userCan( $row, LogPage::DELETED_USER, $user ) ) {
325  if ( $this->fld_user ) {
326  $vals['user'] = $row->actor_name;
327  }
328  if ( $this->fld_userid ) {
329  $vals['userid'] = (int)$row->actor_user;
330  }
331 
332  if ( !$row->actor_user ) {
333  $vals['anon'] = true;
334  }
335  }
336  }
337  if ( $this->fld_timestamp ) {
338  $vals['timestamp'] = wfTimestamp( TS_ISO_8601, $row->log_timestamp );
339  }
340 
341  if ( $this->fld_comment || $this->fld_parsedcomment ) {
343  $vals['commenthidden'] = true;
344  $anyHidden = true;
345  }
346  if ( LogEventsList::userCan( $row, LogPage::DELETED_COMMENT, $user ) ) {
347  $comment = $this->commentStore->getComment( 'log_comment', $row )->text;
348  if ( $this->fld_comment ) {
349  $vals['comment'] = $comment;
350  }
351 
352  if ( $this->fld_parsedcomment ) {
353  $vals['parsedcomment'] = Linker::formatComment( $comment, $title );
354  }
355  }
356  }
357 
358  if ( $this->fld_tags ) {
359  if ( $row->ts_tags ) {
360  $tags = explode( ',', $row->ts_tags );
361  ApiResult::setIndexedTagName( $tags, 'tag' );
362  $vals['tags'] = $tags;
363  } else {
364  $vals['tags'] = [];
365  }
366  }
367 
368  if ( $anyHidden && LogEventsList::isDeleted( $row, LogPage::DELETED_RESTRICTED ) ) {
369  $vals['suppressed'] = true;
370  }
371 
372  return $vals;
373  }
374 
378  private function getAllowedLogActions() {
379  $config = $this->getConfig();
380  return array_keys( array_merge(
381  $config->get( 'LogActions' ),
382  $config->get( 'LogActionsHandlers' )
383  ) );
384  }
385 
386  public function getCacheMode( $params ) {
387  if ( $this->userCanSeeRevDel() ) {
388  return 'private';
389  }
390  if ( $params['prop'] !== null && in_array( 'parsedcomment', $params['prop'] ) ) {
391  // formatComment() calls wfMessage() among other things
392  return 'anon-public-user-private';
393  } elseif ( LogEventsList::getExcludeClause( $this->getDB(), 'user', $this->getUser() )
394  === LogEventsList::getExcludeClause( $this->getDB(), 'public' )
395  ) { // Output can only contain public data.
396  return 'public';
397  } else {
398  return 'anon-public-user-private';
399  }
400  }
401 
402  public function getAllowedParams( $flags = 0 ) {
403  $config = $this->getConfig();
404  if ( $flags & ApiBase::GET_VALUES_FOR_HELP ) {
405  $logActions = $this->getAllowedLogActions();
406  sort( $logActions );
407  } else {
408  $logActions = null;
409  }
410  $ret = [
411  'prop' => [
412  ApiBase::PARAM_ISMULTI => true,
413  ApiBase::PARAM_DFLT => 'ids|title|type|user|timestamp|comment|details',
415  'ids',
416  'title',
417  'type',
418  'user',
419  'userid',
420  'timestamp',
421  'comment',
422  'parsedcomment',
423  'details',
424  'tags'
425  ],
427  ],
428  'type' => [
430  ],
431  'action' => [
432  // validation on request is done in execute()
433  ApiBase::PARAM_TYPE => $logActions
434  ],
435  'start' => [
436  ApiBase::PARAM_TYPE => 'timestamp'
437  ],
438  'end' => [
439  ApiBase::PARAM_TYPE => 'timestamp'
440  ],
441  'dir' => [
442  ApiBase::PARAM_DFLT => 'older',
444  'newer',
445  'older'
446  ],
447  ApiBase::PARAM_HELP_MSG => 'api-help-param-direction',
448  ],
449  'user' => [
450  ApiBase::PARAM_TYPE => 'user',
451  UserDef::PARAM_ALLOWED_USER_TYPES => [ 'name', 'ip', 'id', 'interwiki' ],
452  ],
453  'title' => null,
454  'namespace' => [
455  ApiBase::PARAM_TYPE => 'namespace',
457  ],
458  'prefix' => [],
459  'tag' => null,
460  'limit' => [
461  ApiBase::PARAM_DFLT => 10,
462  ApiBase::PARAM_TYPE => 'limit',
463  ApiBase::PARAM_MIN => 1,
466  ],
467  'continue' => [
468  ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
469  ],
470  ];
471 
472  if ( $config->get( 'MiserMode' ) ) {
473  $ret['prefix'][ApiBase::PARAM_HELP_MSG] = 'api-help-param-disabled-in-miser-mode';
474  }
475 
476  return $ret;
477  }
478 
479  protected function getExamplesMessages() {
480  return [
481  'action=query&list=logevents'
482  => 'apihelp-query+logevents-example-simple',
483  ];
484  }
485 
486  public function getHelpUrls() {
487  return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Logevents';
488  }
489 }
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:970
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:385
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:206
ApiQuery
This is the main query class.
Definition: ApiQuery.php:37
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition: MediaWikiServices.php:180
ApiQueryLogEvents\getExamplesMessages
getExamplesMessages()
Returns usage examples for this module.
Definition: ApiQueryLogEvents.php:479
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:1382
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:105
wfTimestamp
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Definition: GlobalFunctions.php:1692
ApiBase\PARAM_TYPE
const PARAM_TYPE
Definition: ApiBase.php:72
ApiQueryLogEvents\$fld_comment
$fld_comment
Definition: ApiQueryLogEvents.php:53
ApiBase\getResult
getResult()
Get the result object.
Definition: ApiBase.php:571
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:531
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:52
LogEventsList\getExcludeClause
static getExcludeClause( $db, $audience='public', Authority $performer=null)
SQL clause to skip forbidden log types for this user.
Definition: LogEventsList.php:795
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
ApiQueryLogEvents\$fld_timestamp
$fld_timestamp
Definition: ApiQueryLogEvents.php:53
ApiQueryLogEvents
Query action to List the log events, with optional filtering by various parameters.
Definition: ApiQueryLogEvents.php:32
ApiQueryBase\addFieldsIf
addFieldsIf( $value, $condition)
Same as addFields(), but add the fields only if a condition is met.
Definition: ApiQueryBase.php:222
Wikimedia\ParamValidator\ParamValidator::TypeDef\UserDef
Type definition for user types.
Definition: UserDef.php:24
NS_SPECIAL
const NS_SPECIAL
Definition: Defines.php:53
ApiBase\PARAM_MIN
const PARAM_MIN
Definition: ApiBase.php:75
ApiQueryLogEvents\$fld_details
$fld_details
Definition: ApiQueryLogEvents.php:54
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:96
LogPage\DELETED_COMMENT
const DELETED_COMMENT
Definition: LogPage.php:40
ApiQueryLogEvents\getAllowedParams
getAllowedParams( $flags=0)
Definition: ApiQueryLogEvents.php:402
LogPage\DELETED_USER
const DELETED_USER
Definition: LogPage.php:41
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:163
ApiQueryBase\getDB
getDB()
Get the Query database connection (read-only)
Definition: ApiQueryBase.php:117
ApiBase\PARAM_MAX
const PARAM_MAX
Definition: ApiBase.php:73
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:718
$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:650
ApiQueryLogEvents\$fld_type
$fld_type
Definition: ApiQueryLogEvents.php:51
ApiBase\PARAM_EXTRA_NAMESPACES
const PARAM_EXTRA_NAMESPACES
Definition: ApiBase.php:82
ApiQueryLogEvents\getHelpUrls
getHelpUrls()
Return links to more detailed help pages about the module.
Definition: ApiQueryLogEvents.php:486
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:607
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:890
ApiQueryLogEvents\$fld_title
$fld_title
Definition: ApiQueryLogEvents.php:51
ApiBase\dieContinueUsageIf
dieContinueUsageIf( $condition)
Die with the 'badcontinue' error.
Definition: ApiBase.php:1565
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:696
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:176
ApiQueryLogEvents\$fld_parsedcomment
$fld_parsedcomment
Definition: ApiQueryLogEvents.php:53
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:1456
ApiQueryBase\addWhereFld
addWhereFld( $field, $value)
Equivalent to addWhere( [ $field => $value ] )
Definition: ApiQueryBase.php:282
Linker\formatComment
static formatComment( $comment, $title=null, $local=false, $wikiId=null)
This function is called by all recent changes variants, by the page history, and by the user contribu...
Definition: Linker.php:1208
ApiQueryLogEvents\extractRowInfo
extractRowInfo( $row)
Definition: ApiQueryLogEvents.php:279
ApiBase\LIMIT_BIG2
const LIMIT_BIG2
Fast query, apihighlimits limit.
Definition: ApiBase.php:165
ApiQueryLogEvents\$fld_user
$fld_user
Definition: ApiQueryLogEvents.php:52
ApiBase\PARAM_DFLT
const PARAM_DFLT
Definition: ApiBase.php:70
LogEventsList\isDeleted
static isDeleted( $row, $field)
Definition: LogEventsList.php:578
ApiBase\getModuleName
getModuleName()
Get the name of the module being executed by this instance.
Definition: ApiBase.php:440
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:71
ApiQueryLogEvents\getCacheMode
getCacheMode( $params)
Get the cache mode for the data generated by this module.
Definition: ApiQueryLogEvents.php:386
ApiBase\PARAM_MAX2
const PARAM_MAX2
Definition: ApiBase.php:74
ApiQueryLogEvents\execute
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
Definition: ApiQueryLogEvents.php:56
LogPage\DELETED_RESTRICTED
const DELETED_RESTRICTED
Definition: LogPage.php:42
ApiQueryLogEvents\$commentStore
CommentStore $commentStore
Definition: ApiQueryLogEvents.php:35
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:54
ApiQueryLogEvents\__construct
__construct(ApiQuery $query, $moduleName, CommentStore $commentStore)
Definition: ApiQueryLogEvents.php:42
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:138
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:51
ApiQueryLogEvents\getAllowedLogActions
getAllowedLogActions()
Definition: ApiQueryLogEvents.php:378
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:54
$type
$type
Definition: testCompression.php:52