MediaWiki  master
LogEventsList.php
Go to the documentation of this file.
1 <?php
29 
31  const NO_ACTION_LINK = 1;
33  const USE_CHECKBOXES = 4;
34 
35  public $flags;
36 
41  protected $mDefaultQuery;
42 
46  protected $showTagEditUI;
47 
51  protected $allowedActions = null;
52 
56  private $linkRenderer;
57 
68  public function __construct( $context, $linkRenderer = null, $flags = 0 ) {
69  if ( $context instanceof IContextSource ) {
70  $this->setContext( $context );
71  } else {
72  // Old parameters, $context should be a Skin object
73  $this->setContext( $context->getContext() );
74  }
75 
76  $this->flags = $flags;
77  $this->showTagEditUI = ChangeTags::showTagEditingUI( $this->getUser() );
78  if ( $linkRenderer instanceof LinkRenderer ) {
79  $this->linkRenderer = $linkRenderer;
80  }
81  }
82 
87  protected function getLinkRenderer() {
88  if ( $this->linkRenderer !== null ) {
89  return $this->linkRenderer;
90  } else {
91  return MediaWikiServices::getInstance()->getLinkRenderer();
92  }
93  }
94 
111  public function showOptions( $types = [], $user = '', $page = '', $pattern = false, $year = 0,
112  $month = 0, $day = 0, $filter = null, $tagFilter = '', $action = null
113  ) {
114  // For B/C, we take strings, but make sure they are converted...
115  $types = ( $types === '' ) ? [] : (array)$types;
116 
117  $formDescriptor = [];
118 
119  // Basic selectors
120  $formDescriptor['type'] = $this->getTypeMenuDesc( $types );
121  $formDescriptor['user'] = $this->getUserInputDesc( $user );
122  $formDescriptor['page'] = $this->getTitleInputDesc( $page );
123 
124  // Add extra inputs if any
125  // This could either be a form descriptor array or a string with raw HTML.
126  // We need it to work in both cases and show a deprecation warning if it
127  // is a string. See T199495.
128  $extraInputsDescriptor = $this->getExtraInputsDesc( $types );
129  if (
130  is_array( $extraInputsDescriptor ) &&
131  !empty( $extraInputsDescriptor )
132  ) {
133  $formDescriptor[ 'extra' ] = $extraInputsDescriptor;
134  } elseif (
135  is_string( $extraInputsDescriptor ) &&
136  $extraInputsDescriptor !== ''
137  ) {
138  // We'll add this to the footer of the form later
139  $extraInputsString = $extraInputsDescriptor;
140  wfDeprecated( '$input in LogEventsListGetExtraInputs hook', '1.32' );
141  }
142 
143  // Title pattern, if allowed
144  if ( !$this->getConfig()->get( 'MiserMode' ) ) {
145  $formDescriptor['pattern'] = $this->getTitlePatternDesc( $pattern );
146  }
147 
148  // Date menu
149  $formDescriptor['date'] = [
150  'type' => 'date',
151  'label-message' => 'date',
152  'default' => $year && $month && $day ? sprintf( "%04d-%02d-%02d", $year, $month, $day ) : '',
153  ];
154 
155  // Tag filter
156  $formDescriptor['tagfilter'] = [
157  'type' => 'tagfilter',
158  'name' => 'tagfilter',
159  'label-raw' => $this->msg( 'tag-filter' )->parse(),
160  ];
161 
162  // Filter links
163  if ( $filter ) {
164  $formDescriptor['filters'] = $this->getFiltersDesc( $filter );
165  }
166 
167  // Action filter
168  if (
169  $action !== null &&
170  $this->allowedActions !== null &&
171  count( $this->allowedActions ) > 0
172  ) {
173  $formDescriptor['subtype'] = $this->getActionSelectorDesc( $types, $action );
174  }
175 
176  $context = new DerivativeContext( $this->getContext() );
177  $context->setTitle( SpecialPage::getTitleFor( 'Log' ) ); // Remove subpage
178  $htmlForm = HTMLForm::factory( 'ooui', $formDescriptor, $context );
179  $htmlForm
180  ->setSubmitText( $this->msg( 'logeventslist-submit' )->text() )
181  ->setMethod( 'get' )
182  ->setWrapperLegendMsg( 'log' );
183 
184  // TODO This will should be removed at some point. See T199495.
185  if ( isset( $extraInputsString ) ) {
186  $htmlForm->addFooterText( Html::rawElement(
187  'div',
188  null,
189  $extraInputsString
190  ) );
191  }
192 
193  $htmlForm->prepareForm()->displayForm( false );
194  }
195 
200  private function getFiltersDesc( $filter ) {
201  $options = [];
202  $default = [];
203  foreach ( $filter as $type => $val ) {
204  $message = $this->msg( "logeventslist-{$type}-log" );
205  // FIXME: Remove this check once T199657 is fully resolved.
206  if ( !$message->exists() ) {
207  $message = $this->msg( "log-show-hide-{$type}" )->params( $this->msg( 'show' )->text() );
208  }
209  $options[ $message->text() ] = $type;
210 
211  if ( $val === false ) {
212  $default[] = $type;
213  }
214  }
215  return [
216  'class' => 'HTMLMultiSelectField',
217  'label-message' => 'logeventslist-more-filters',
218  'flatlist' => true,
219  'options' => $options,
220  'default' => $default,
221  ];
222  }
223 
228  private function getTypeMenuDesc( $queryTypes ) {
229  $queryType = count( $queryTypes ) == 1 ? $queryTypes[0] : '';
230 
231  $typesByName = []; // Temporary array
232  // First pass to load the log names
233  foreach ( LogPage::validTypes() as $type ) {
234  $page = new LogPage( $type );
235  $restriction = $page->getRestriction();
236  if ( MediaWikiServices::getInstance()
238  ->userHasRight( $this->getUser(), $restriction )
239  ) {
240  $typesByName[$type] = $page->getName()->text();
241  }
242  }
243 
244  // Second pass to sort by name
245  asort( $typesByName );
246 
247  // Always put "All public logs" on top
248  $public = $typesByName[''];
249  unset( $typesByName[''] );
250  $typesByName = [ '' => $public ] + $typesByName;
251 
252  return [
253  'class' => 'HTMLSelectField',
254  'name' => 'type',
255  'options' => array_flip( $typesByName ),
256  'default' => $queryType,
257  ];
258  }
259 
264  private function getUserInputDesc( $user ) {
265  return [
266  'class' => 'HTMLUserTextField',
267  'label-message' => 'specialloguserlabel',
268  'name' => 'user',
269  'default' => $user,
270  ];
271  }
272 
277  private function getTitleInputDesc( $title ) {
278  return [
279  'class' => 'HTMLTitleTextField',
280  'label-message' => 'speciallogtitlelabel',
281  'name' => 'page',
282  'required' => false
283  ];
284  }
285 
290  private function getTitlePatternDesc( $pattern ) {
291  return [
292  'type' => 'check',
293  'label-message' => 'log-title-wildcard',
294  'name' => 'pattern',
295  ];
296  }
297 
302  private function getExtraInputsDesc( $types ) {
303  if ( count( $types ) == 1 ) {
304  if ( $types[0] == 'suppress' ) {
305  return [
306  'type' => 'text',
307  'label-message' => 'revdelete-offender',
308  'name' => 'offender',
309  ];
310  } else {
311  // Allow extensions to add their own extra inputs
312  // This could be an array or string. See T199495.
313  $input = ''; // Deprecated
314  $formDescriptor = [];
315  Hooks::run( 'LogEventsListGetExtraInputs', [ $types[0], $this, &$input, &$formDescriptor ] );
316 
317  return empty( $formDescriptor ) ? $input : $formDescriptor;
318  }
319  }
320 
321  return [];
322  }
323 
330  private function getActionSelectorDesc( $types, $action ) {
331  $actionOptions = [];
332  $actionOptions[ 'log-action-filter-all' ] = '';
333 
334  foreach ( $this->allowedActions as $value ) {
335  $msgKey = 'log-action-filter-' . $types[0] . '-' . $value;
336  $actionOptions[ $msgKey ] = $value;
337  }
338 
339  return [
340  'class' => 'HTMLSelectField',
341  'name' => 'subtype',
342  'options-messages' => $actionOptions,
343  'default' => $action,
344  'label' => $this->msg( 'log-action-filter-' . $types[0] )->text(),
345  ];
346  }
347 
354  public function setAllowedActions( $actions ) {
355  $this->allowedActions = $actions;
356  }
357 
361  public function beginLogEventsList() {
362  return "<ul>\n";
363  }
364 
368  public function endLogEventsList() {
369  return "</ul>\n";
370  }
371 
376  public function logLine( $row ) {
377  $entry = DatabaseLogEntry::newFromRow( $row );
378  $formatter = LogFormatter::newFromEntry( $entry );
379  $formatter->setContext( $this->getContext() );
380  $formatter->setLinkRenderer( $this->getLinkRenderer() );
381  $formatter->setShowUserToolLinks( !( $this->flags & self::NO_EXTRA_USER_LINKS ) );
382 
383  $time = htmlspecialchars( $this->getLanguage()->userTimeAndDate(
384  $entry->getTimestamp(), $this->getUser() ) );
385 
386  $action = $formatter->getActionText();
387 
388  if ( $this->flags & self::NO_ACTION_LINK ) {
389  $revert = '';
390  } else {
391  $revert = $formatter->getActionLinks();
392  if ( $revert != '' ) {
393  $revert = '<span class="mw-logevent-actionlink">' . $revert . '</span>';
394  }
395  }
396 
397  $comment = $formatter->getComment();
398 
399  // Some user can hide log items and have review links
400  $del = $this->getShowHideLinks( $row );
401 
402  // Any tags...
403  list( $tagDisplay, $newClasses ) = ChangeTags::formatSummaryRow(
404  $row->ts_tags,
405  'logevent',
406  $this->getContext()
407  );
408  $classes = array_merge(
409  [ 'mw-logline-' . $entry->getType() ],
410  $newClasses
411  );
412  $attribs = [
413  'data-mw-logid' => $entry->getId(),
414  'data-mw-logaction' => $entry->getFullType(),
415  ];
416  $ret = "$del $time $action $comment $revert $tagDisplay";
417 
418  // Let extensions add data
419  Hooks::run( 'LogEventsListLineEnding', [ $this, &$ret, $entry, &$classes, &$attribs ] );
420  $attribs = array_filter( $attribs,
421  [ Sanitizer::class, 'isReservedDataAttribute' ],
422  ARRAY_FILTER_USE_KEY
423  );
424  $attribs['class'] = implode( ' ', $classes );
425 
426  return Html::rawElement( 'li', $attribs, $ret ) . "\n";
427  }
428 
433  private function getShowHideLinks( $row ) {
434  // We don't want to see the links and
435  if ( $this->flags == self::NO_ACTION_LINK ) {
436  return '';
437  }
438 
439  $user = $this->getUser();
440 
441  // If change tag editing is available to this user, return the checkbox
442  if ( $this->flags & self::USE_CHECKBOXES && $this->showTagEditUI ) {
443  return Xml::check(
444  'showhiderevisions',
445  false,
446  [ 'name' => 'ids[' . $row->log_id . ']' ]
447  );
448  }
449 
450  // no one can hide items from the suppress log.
451  if ( $row->log_type == 'suppress' ) {
452  return '';
453  }
454 
455  $del = '';
456  $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
457  // Don't show useless checkbox to people who cannot hide log entries
458  if ( $permissionManager->userHasRight( $user, 'deletedhistory' ) ) {
459  $canHide = $permissionManager->userHasRight( $user, 'deletelogentry' );
460  $canViewSuppressedOnly = $permissionManager->userHasRight( $user, 'viewsuppressed' ) &&
461  !$permissionManager->userHasRight( $user, 'suppressrevision' );
462  $entryIsSuppressed = self::isDeleted( $row, LogPage::DELETED_RESTRICTED );
463  $canViewThisSuppressedEntry = $canViewSuppressedOnly && $entryIsSuppressed;
464  if ( $row->log_deleted || $canHide ) {
465  // Show checkboxes instead of links.
466  if ( $canHide && $this->flags & self::USE_CHECKBOXES && !$canViewThisSuppressedEntry ) {
467  // If event was hidden from sysops
468  if ( !self::userCan( $row, LogPage::DELETED_RESTRICTED, $user ) ) {
469  $del = Xml::check( 'deleterevisions', false, [ 'disabled' => 'disabled' ] );
470  } else {
471  $del = Xml::check(
472  'showhiderevisions',
473  false,
474  [ 'name' => 'ids[' . $row->log_id . ']' ]
475  );
476  }
477  } else {
478  // If event was hidden from sysops
479  if ( !self::userCan( $row, LogPage::DELETED_RESTRICTED, $user ) ) {
480  $del = Linker::revDeleteLinkDisabled( $canHide );
481  } else {
482  $query = [
483  'target' => SpecialPage::getTitleFor( 'Log', $row->log_type )->getPrefixedDBkey(),
484  'type' => 'logging',
485  'ids' => $row->log_id,
486  ];
487  $del = Linker::revDeleteLink(
488  $query,
489  $entryIsSuppressed,
490  $canHide && !$canViewThisSuppressedEntry
491  );
492  }
493  }
494  }
495  }
496 
497  return $del;
498  }
499 
507  public static function typeAction( $row, $type, $action, $right = '' ) {
508  $match = is_array( $type ) ?
509  in_array( $row->log_type, $type ) : $row->log_type == $type;
510  if ( $match ) {
511  $match = is_array( $action ) ?
512  in_array( $row->log_action, $action ) : $row->log_action == $action;
513  if ( $match && $right ) {
514  global $wgUser;
515  $match = MediaWikiServices::getInstance()
516  ->getPermissionManager()
517  ->userHasRight( $wgUser, $right );
518  }
519  }
520 
521  return $match;
522  }
523 
533  public static function userCan( $row, $field, User $user = null ) {
534  return self::userCanBitfield( $row->log_deleted, $field, $user ) &&
535  self::userCanViewLogType( $row->log_type, $user );
536  }
537 
547  public static function userCanBitfield( $bitfield, $field, User $user = null ) {
548  if ( $bitfield & $field ) {
549  if ( $user === null ) {
550  global $wgUser;
551  $user = $wgUser;
552  }
553  if ( $bitfield & LogPage::DELETED_RESTRICTED ) {
554  $permissions = [ 'suppressrevision', 'viewsuppressed' ];
555  } else {
556  $permissions = [ 'deletedhistory' ];
557  }
558  $permissionlist = implode( ', ', $permissions );
559  wfDebug( "Checking for $permissionlist due to $field match on $bitfield\n" );
560  return MediaWikiServices::getInstance()
561  ->getPermissionManager()
562  ->userHasAnyRight( $user, ...$permissions );
563  }
564  return true;
565  }
566 
575  public static function userCanViewLogType( $type, User $user = null ) {
576  if ( $user === null ) {
577  global $wgUser;
578  $user = $wgUser;
579  }
580  $logRestrictions = MediaWikiServices::getInstance()->getMainConfig()->get( 'LogRestrictions' );
581  if ( isset( $logRestrictions[$type] ) && !MediaWikiServices::getInstance()
583  ->userHasRight( $user, $logRestrictions[$type] )
584  ) {
585  return false;
586  }
587  return true;
588  }
589 
595  public static function isDeleted( $row, $field ) {
596  return ( $row->log_deleted & $field ) == $field;
597  }
598 
624  public static function showLogExtract(
625  &$out, $types = [], $page = '', $user = '', $param = []
626  ) {
627  $defaultParameters = [
628  'lim' => 25,
629  'conds' => [],
630  'showIfEmpty' => true,
631  'msgKey' => [ '' ],
632  'wrap' => "$1",
633  'flags' => 0,
634  'useRequestParams' => false,
635  'useMaster' => false,
636  'extraUrlParams' => false,
637  ];
638  # The + operator appends elements of remaining keys from the right
639  # handed array to the left handed, whereas duplicated keys are NOT overwritten.
640  $param += $defaultParameters;
641  # Convert $param array to individual variables
642  $lim = $param['lim'];
643  $conds = $param['conds'];
644  $showIfEmpty = $param['showIfEmpty'];
645  $msgKey = $param['msgKey'];
646  $wrap = $param['wrap'];
647  $flags = $param['flags'];
648  $extraUrlParams = $param['extraUrlParams'];
649 
650  $useRequestParams = $param['useRequestParams'];
651  if ( !is_array( $msgKey ) ) {
652  $msgKey = [ $msgKey ];
653  }
654 
655  if ( $out instanceof OutputPage ) {
656  $context = $out->getContext();
657  } else {
659  }
660 
661  // FIXME: Figure out how to inject this
662  $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
663 
664  # Insert list of top 50 (or top $lim) items
665  $loglist = new LogEventsList( $context, $linkRenderer, $flags );
666  $pager = new LogPager( $loglist, $types, $user, $page, '', $conds );
667  if ( !$useRequestParams ) {
668  # Reset vars that may have been taken from the request
669  $pager->mLimit = 50;
670  $pager->mDefaultLimit = 50;
671  $pager->mOffset = "";
672  $pager->mIsBackwards = false;
673  }
674 
675  if ( $param['useMaster'] ) {
676  $pager->mDb = wfGetDB( DB_MASTER );
677  }
678  if ( isset( $param['offset'] ) ) { # Tell pager to ignore WebRequest offset
679  $pager->setOffset( $param['offset'] );
680  }
681 
682  if ( $lim > 0 ) {
683  $pager->mLimit = $lim;
684  }
685  // Fetch the log rows and build the HTML if needed
686  $logBody = $pager->getBody();
687  $numRows = $pager->getNumRows();
688 
689  $s = '';
690 
691  if ( $logBody ) {
692  if ( $msgKey[0] ) {
693  $dir = $context->getLanguage()->getDir();
694  $lang = $context->getLanguage()->getHtmlCode();
695 
696  $s = Xml::openElement( 'div', [
697  'class' => "mw-warning-with-logexcerpt mw-content-$dir",
698  'dir' => $dir,
699  'lang' => $lang,
700  ] );
701 
702  if ( count( $msgKey ) == 1 ) {
703  $s .= $context->msg( $msgKey[0] )->parseAsBlock();
704  } else { // Process additional arguments
705  $args = $msgKey;
706  array_shift( $args );
707  $s .= $context->msg( $msgKey[0], $args )->parseAsBlock();
708  }
709  }
710  $s .= $loglist->beginLogEventsList() .
711  $logBody .
712  $loglist->endLogEventsList();
713  // add styles for change tags
714  $context->getOutput()->addModuleStyles( 'mediawiki.interface.helpers.styles' );
715  } elseif ( $showIfEmpty ) {
716  $s = Html::rawElement( 'div', [ 'class' => 'mw-warning-logempty' ],
717  $context->msg( 'logempty' )->parse() );
718  }
719 
720  if ( $numRows > $pager->mLimit ) { # Show "Full log" link
721  $urlParam = [];
722  if ( $page instanceof Title ) {
723  $urlParam['page'] = $page->getPrefixedDBkey();
724  } elseif ( $page != '' ) {
725  $urlParam['page'] = $page;
726  }
727 
728  if ( $user != '' ) {
729  $urlParam['user'] = $user;
730  }
731 
732  if ( !is_array( $types ) ) { # Make it an array, if it isn't
733  $types = [ $types ];
734  }
735 
736  # If there is exactly one log type, we can link to Special:Log?type=foo
737  if ( count( $types ) == 1 ) {
738  $urlParam['type'] = $types[0];
739  }
740 
741  if ( $extraUrlParams !== false ) {
742  $urlParam = array_merge( $urlParam, $extraUrlParams );
743  }
744 
745  $s .= $linkRenderer->makeKnownLink(
746  SpecialPage::getTitleFor( 'Log' ),
747  $context->msg( 'log-fulllog' )->text(),
748  [],
749  $urlParam
750  );
751  }
752 
753  if ( $logBody && $msgKey[0] ) {
754  $s .= '</div>';
755  }
756 
757  if ( $wrap != '' ) { // Wrap message in html
758  $s = str_replace( '$1', $s, $wrap );
759  }
760 
761  /* hook can return false, if we don't want the message to be emitted (Wikia BugId:7093) */
762  if ( Hooks::run( 'LogEventsListShowLogExtract', [ &$s, $types, $page, $user, $param ] ) ) {
763  // $out can be either an OutputPage object or a String-by-reference
764  if ( $out instanceof OutputPage ) {
765  $out->addHTML( $s );
766  } else {
767  $out = $s;
768  }
769  }
770 
771  return $numRows;
772  }
773 
782  public static function getExcludeClause( $db, $audience = 'public', User $user = null ) {
783  global $wgLogRestrictions;
784 
785  if ( $audience != 'public' && $user === null ) {
786  global $wgUser;
787  $user = $wgUser;
788  }
789 
790  // Reset the array, clears extra "where" clauses when $par is used
791  $hiddenLogs = [];
792 
793  // Don't show private logs to unprivileged users
794  foreach ( $wgLogRestrictions as $logType => $right ) {
795  if ( $audience == 'public' || !MediaWikiServices::getInstance()
797  ->userHasRight( $user, $right )
798  ) {
799  $hiddenLogs[] = $logType;
800  }
801  }
802  if ( count( $hiddenLogs ) == 1 ) {
803  return 'log_type != ' . $db->addQuotes( $hiddenLogs[0] );
804  } elseif ( $hiddenLogs ) {
805  return 'log_type NOT IN (' . $db->makeList( $hiddenLogs ) . ')';
806  }
807 
808  return false;
809  }
810 }
setContext(IContextSource $context)
const USE_CHECKBOXES
getTitleInputDesc( $title)
The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and ...
static newFromRow( $row)
Constructs new LogEntry from database result row.
if(!isset( $args[0])) $lang
const NO_EXTRA_USER_LINKS
static newFromEntry(LogEntry $entry)
Constructs a new formatter suitable for given entry.
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
Definition: Html.php:209
An IContextSource implementation which will inherit context from another source but allow individual ...
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
getFiltersDesc( $filter)
static typeAction( $row, $type, $action, $right='')
getShowHideLinks( $row)
msg( $key)
Get a Message object with context set Parameters are the same as wfMessage()
$wgLogRestrictions
This restricts log access to those who have a certain right Users without this will not see it in the...
static factory( $displayFormat)
Construct a HTMLForm object for given display type.
Definition: HTMLForm.php:304
IContextSource $context
const DB_MASTER
Definition: defines.php:26
if( $line===false) $args
Definition: cdb.php:64
Class to simplify the use of log pages.
Definition: LogPage.php:33
The User object encapsulates all of the user-specific settings (user_id, name, rights, email address, options, last login time).
Definition: User.php:51
getUserInputDesc( $user)
getPermissionManager()
Class that generates HTML links for pages.
static getMain()
Get the RequestContext object associated with the main request.
static openElement( $element, $attribs=null)
This opens an XML element.
Definition: Xml.php:108
__construct( $context, $linkRenderer=null, $flags=0)
The first two parameters used to be $skin and $out, but now only a context is needed, that&#39;s why there&#39;s a second unused parameter.
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
static userCanBitfield( $bitfield, $field, User $user=null)
Determine if the current user is allowed to view a particular field of this log row, if it&#39;s marked as deleted.
getContext()
Get the base IContextSource object.
static showTagEditingUI(User $user)
Indicate whether change tag editing UI is relevant.
static isDeleted( $row, $field)
getTypeMenuDesc( $queryTypes)
$filter
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don&#39;t need a full Title object...
Definition: SpecialPage.php:83
const NO_ACTION_LINK
const DELETED_RESTRICTED
Definition: LogPage.php:37
setAllowedActions( $actions)
Sets the action types allowed for log filtering To one action type may correspond several log_actions...
msg( $key)
This is the method for getting translated interface messages.
getActionSelectorDesc( $types, $action)
Drop down menu for selection of actions that can be used to filter the log.
static userCan( $row, $field, User $user=null)
Determine if the current user is allowed to view a particular field of this log row, if it&#39;s marked as deleted and/or restricted log type.
static userCanViewLogType( $type, User $user=null)
Determine if the current user is allowed to view a particular field of this log row, if it&#39;s marked as restricted log type.
static getExcludeClause( $db, $audience='public', User $user=null)
SQL clause to skip forbidden log types for this user.
static revDeleteLink( $query=[], $restricted=false, $delete=true)
Creates a (show/hide) link for deleting revisions/log entries.
Definition: Linker.php:2154
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
showOptions( $types=[], $user='', $page='', $pattern=false, $year=0, $month=0, $day=0, $filter=null, $tagFilter='', $action=null)
Show options for the log list.
static formatSummaryRow( $tags, $page, IContextSource $context=null)
Creates HTML for the given tags.
Definition: ChangeTags.php:94
getExtraInputsDesc( $types)
getTitlePatternDesc( $pattern)
static validTypes()
Get the list of valid log types.
Definition: LogPage.php:198
static check( $name, $checked=false, $attribs=[])
Convenience function to build an HTML checkbox.
Definition: Xml.php:323
LinkRenderer null $linkRenderer
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
Definition: Hooks.php:200
array $mDefaultQuery
static revDeleteLinkDisabled( $delete=true)
Creates a dead (show/hide) link for deleting revisions/log entries.
Definition: Linker.php:2176
static showLogExtract(&$out, $types=[], $page='', $user='', $param=[])
Show log extract.