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