MediaWiki REL1_41
LogFormatter.php
Go to the documentation of this file.
1<?php
36
50 // Audience options for viewing usernames, comments, and actions
51 public const FOR_PUBLIC = 1;
52 public const FOR_THIS_USER = 2;
53
54 // Static->
55
61 public static function newFromEntry( LogEntry $entry ) {
62 $logActionsHandlers = MediaWikiServices::getInstance()->getMainConfig()
63 ->get( MainConfigNames::LogActionsHandlers );
64 $fulltype = $entry->getFullType();
65 $wildcard = $entry->getType() . '/*';
66 $handler = $logActionsHandlers[$fulltype] ?? $logActionsHandlers[$wildcard] ?? '';
67
68 if ( $handler !== '' && is_string( $handler ) && class_exists( $handler ) ) {
69 return new $handler( $entry );
70 }
71
72 return new LegacyLogFormatter( $entry );
73 }
74
82 public static function newFromRow( $row ) {
83 return self::newFromEntry( DatabaseLogEntry::newFromRow( $row ) );
84 }
85
86 // Nonstatic->
87
89 protected $entry;
90
92 protected $audience = self::FOR_PUBLIC;
93
95 public $context;
96
98 protected $linkFlood = false;
99
107 protected $plaintext = false;
108
110 protected $irctext = false;
111
115 private $linkRenderer;
116
122
128 protected function __construct( LogEntry $entry ) {
129 $this->entry = $entry;
130 $this->context = RequestContext::getMain();
131 }
132
137 public function setContext( IContextSource $context ) {
138 $this->context = $context;
139 }
140
145 public function setLinkRenderer( LinkRenderer $linkRenderer ) {
146 $this->linkRenderer = $linkRenderer;
147 }
148
153 public function getLinkRenderer() {
154 if ( $this->linkRenderer !== null ) {
155 return $this->linkRenderer;
156 } else {
157 return MediaWikiServices::getInstance()->getLinkRenderer();
158 }
159 }
160
167 public function setAudience( $audience ) {
168 $this->audience = ( $audience == self::FOR_THIS_USER )
169 ? self::FOR_THIS_USER
170 : self::FOR_PUBLIC;
171 }
172
177 public function canViewLogType() {
178 // If the user doesn't have the right permission to view the specific
179 // log type, return false
180 $logRestrictions = $this->context->getConfig()->get( MainConfigNames::LogRestrictions );
181 $type = $this->entry->getType();
182 return !isset( $logRestrictions[$type] )
183 || $this->context->getAuthority()->isAllowed( $logRestrictions[$type] );
184 }
185
191 protected function canView( $field ) {
192 if ( $this->audience == self::FOR_THIS_USER ) {
193 return LogEventsList::userCanBitfield(
194 $this->entry->getDeleted(), $field, $this->context->getAuthority() ) &&
195 self::canViewLogType();
196 } else {
197 return !$this->entry->isDeleted( $field ) && self::canViewLogType();
198 }
199 }
200
207 public function setShowUserToolLinks( $value ) {
208 $this->linkFlood = $value;
209 }
210
219 public function getPlainActionText() {
220 $this->plaintext = true;
221 $text = $this->getActionText();
222 $this->plaintext = false;
223
224 return $text;
225 }
226
233 public function getIRCActionComment() {
234 $actionComment = $this->getIRCActionText();
235 $comment = $this->entry->getComment();
236
237 if ( $comment != '' ) {
238 if ( $actionComment == '' ) {
239 $actionComment = $comment;
240 } else {
241 $actionComment .= wfMessage( 'colon-separator' )->inContentLanguage()->text() . $comment;
242 }
243 }
244
245 return $actionComment;
246 }
247
255 public function getIRCActionText() {
256 $this->plaintext = true;
257 $this->irctext = true;
258
259 $entry = $this->entry;
260 $parameters = $entry->getParameters();
261 // @see LogPage::actionText()
262 // Text of title the action is aimed at.
263 $target = $entry->getTarget()->getPrefixedText();
264 $text = null;
265 $contLang = MediaWikiServices::getInstance()->getContentLanguage();
266 switch ( $entry->getType() ) {
267 case 'move':
268 switch ( $entry->getSubtype() ) {
269 case 'move':
270 $movesource = $parameters['4::target'];
271 $text = wfMessage( '1movedto2' )
272 ->rawParams( $target, $movesource )->inContentLanguage()->escaped();
273 break;
274 case 'move_redir':
275 $movesource = $parameters['4::target'];
276 $text = wfMessage( '1movedto2_redir' )
277 ->rawParams( $target, $movesource )->inContentLanguage()->escaped();
278 break;
279 case 'move-noredirect':
280 break;
281 case 'move_redir-noredirect':
282 break;
283 }
284 break;
285
286 case 'delete':
287 switch ( $entry->getSubtype() ) {
288 case 'delete':
289 $text = wfMessage( 'deletedarticle' )
290 ->rawParams( $target )->inContentLanguage()->escaped();
291 break;
292 case 'restore':
293 $text = wfMessage( 'undeletedarticle' )
294 ->rawParams( $target )->inContentLanguage()->escaped();
295 break;
296 }
297 break;
298
299 case 'patrol':
300 // https://github.com/wikimedia/mediawiki/commit/1a05f8faf78675dc85984f27f355b8825b43efff
301 // Create a diff link to the patrolled revision
302 if ( $entry->getSubtype() === 'patrol' ) {
303 $diffLink = htmlspecialchars(
304 wfMessage( 'patrol-log-diff', $parameters['4::curid'] )
305 ->inContentLanguage()->text() );
306 $text = wfMessage( 'patrol-log-line', $diffLink, "[[$target]]", "" )
307 ->inContentLanguage()->text();
308 } else {
309 // broken??
310 }
311 break;
312
313 case 'protect':
314 switch ( $entry->getSubtype() ) {
315 case 'protect':
316 $text = wfMessage( 'protectedarticle' )
317 ->rawParams( $target . ' ' . $parameters['4::description'] )
318 ->inContentLanguage()
319 ->escaped();
320 break;
321 case 'unprotect':
322 $text = wfMessage( 'unprotectedarticle' )
323 ->rawParams( $target )->inContentLanguage()->escaped();
324 break;
325 case 'modify':
326 $text = wfMessage( 'modifiedarticleprotection' )
327 ->rawParams( $target . ' ' . $parameters['4::description'] )
328 ->inContentLanguage()
329 ->escaped();
330 break;
331 case 'move_prot':
332 $text = wfMessage( 'movedarticleprotection' )
333 ->rawParams( $target, $parameters['4::oldtitle'] )->inContentLanguage()->escaped();
334 break;
335 }
336 break;
337
338 case 'newusers':
339 switch ( $entry->getSubtype() ) {
340 case 'newusers':
341 case 'create':
342 $text = wfMessage( 'newuserlog-create-entry' )
343 ->inContentLanguage()->escaped();
344 break;
345 case 'create2':
346 case 'byemail':
347 $text = wfMessage( 'newuserlog-create2-entry' )
348 ->rawParams( $target )->inContentLanguage()->escaped();
349 break;
350 case 'autocreate':
351 $text = wfMessage( 'newuserlog-autocreate-entry' )
352 ->inContentLanguage()->escaped();
353 break;
354 }
355 break;
356
357 case 'upload':
358 switch ( $entry->getSubtype() ) {
359 case 'upload':
360 $text = wfMessage( 'uploadedimage' )
361 ->rawParams( $target )->inContentLanguage()->escaped();
362 break;
363 case 'overwrite':
364 case 'revert':
365 $text = wfMessage( 'overwroteimage' )
366 ->rawParams( $target )->inContentLanguage()->escaped();
367 break;
368 }
369 break;
370
371 case 'rights':
372 if ( count( $parameters['4::oldgroups'] ) ) {
373 $oldgroups = implode( ', ', $parameters['4::oldgroups'] );
374 } else {
375 $oldgroups = wfMessage( 'rightsnone' )->inContentLanguage()->escaped();
376 }
377 if ( count( $parameters['5::newgroups'] ) ) {
378 $newgroups = implode( ', ', $parameters['5::newgroups'] );
379 } else {
380 $newgroups = wfMessage( 'rightsnone' )->inContentLanguage()->escaped();
381 }
382 switch ( $entry->getSubtype() ) {
383 case 'rights':
384 $text = wfMessage( 'rightslogentry' )
385 ->rawParams( $target, $oldgroups, $newgroups )->inContentLanguage()->escaped();
386 break;
387 case 'autopromote':
388 $text = wfMessage( 'rightslogentry-autopromote' )
389 ->rawParams( $target, $oldgroups, $newgroups )->inContentLanguage()->escaped();
390 break;
391 }
392 break;
393
394 case 'merge':
395 $text = wfMessage( 'pagemerge-logentry' )
396 ->rawParams( $target, $parameters['4::dest'], $parameters['5::mergepoint'] )
397 ->inContentLanguage()->escaped();
398 break;
399
400 case 'block':
401 switch ( $entry->getSubtype() ) {
402 case 'block':
403 // Keep compatibility with extensions by checking for
404 // new key (5::duration/6::flags) or old key (0/optional 1)
405 if ( $entry->isLegacy() ) {
406 $rawDuration = $parameters[0];
407 $rawFlags = $parameters[1] ?? '';
408 } else {
409 $rawDuration = $parameters['5::duration'];
410 $rawFlags = $parameters['6::flags'];
411 }
412 $duration = $contLang->translateBlockExpiry(
413 $rawDuration,
414 null,
415 (int)wfTimestamp( TS_UNIX, $entry->getTimestamp() )
416 );
417 $flags = BlockLogFormatter::formatBlockFlags( $rawFlags, $contLang );
418 $text = wfMessage( 'blocklogentry' )
419 ->rawParams( $target, $duration, $flags )->inContentLanguage()->escaped();
420 break;
421 case 'unblock':
422 $text = wfMessage( 'unblocklogentry' )
423 ->rawParams( $target )->inContentLanguage()->escaped();
424 break;
425 case 'reblock':
426 $duration = $contLang->translateBlockExpiry(
427 $parameters['5::duration'],
428 null,
429 (int)wfTimestamp( TS_UNIX, $entry->getTimestamp() )
430 );
431 $flags = BlockLogFormatter::formatBlockFlags( $parameters['6::flags'],
432 $contLang );
433 $text = wfMessage( 'reblock-logentry' )
434 ->rawParams( $target, $duration, $flags )->inContentLanguage()->escaped();
435 break;
436 }
437 break;
438
439 case 'import':
440 switch ( $entry->getSubtype() ) {
441 case 'upload':
442 $text = wfMessage( 'import-logentry-upload' )
443 ->rawParams( $target )->inContentLanguage()->escaped();
444 break;
445 case 'interwiki':
446 $text = wfMessage( 'import-logentry-interwiki' )
447 ->rawParams( $target )->inContentLanguage()->escaped();
448 break;
449 }
450 break;
451 // case 'suppress' --private log -- aaron (so we know who to blame in a few years :-D)
452 // default:
453 }
454
455 $this->plaintext = false;
456 $this->irctext = false;
457
458 return $text ?? $this->getPlainActionText();
459 }
460
468 public function getActionText() {
469 if ( $this->canView( LogPage::DELETED_ACTION ) ) {
470 $element = $this->getActionMessage();
471 if ( $element instanceof Message ) {
472 $element = $this->plaintext ? $element->text() : $element->escaped();
473 }
474 if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) ) {
475 $element = $this->styleRestrictedElement( $element );
476 }
477 } else {
478 $sep = $this->msg( 'word-separator' );
479 $sep = $this->plaintext ? $sep->text() : $sep->escaped();
480 $performer = $this->getPerformerElement();
481 $element = $performer . $sep . $this->getRestrictedElement( 'rev-deleted-event' );
482 }
483
484 return $element;
485 }
486
493 protected function getActionMessage() {
494 $message = $this->msg( $this->getMessageKey() );
495 $message->params( $this->getMessageParameters() );
496
497 return $message;
498 }
499
508 protected function getMessageKey() {
509 $type = $this->entry->getType();
510 $subtype = $this->entry->getSubtype();
511
512 return "logentry-$type-$subtype";
513 }
514
521 public function getActionLinks() {
522 return '';
523 }
524
531 protected function extractParameters() {
532 $entry = $this->entry;
533 $params = [];
534
535 if ( $entry->isLegacy() ) {
536 foreach ( $entry->getParameters() as $index => $value ) {
537 $params[$index + 3] = $value;
538 }
539 }
540
541 // Filter out parameters which are not in format #:foo
542 foreach ( $entry->getParameters() as $key => $value ) {
543 if ( strpos( $key, ':' ) === false ) {
544 continue;
545 }
546 [ $index, $type, ] = explode( ':', $key, 3 );
547 if ( ctype_digit( $index ) ) {
548 $params[(int)$index - 1] = $this->formatParameterValue( $type, $value );
549 }
550 }
551
552 /* Message class doesn't like non consecutive numbering.
553 * Fill in missing indexes with empty strings to avoid
554 * incorrect renumbering.
555 */
556 if ( count( $params ) ) {
557 $max = max( array_keys( $params ) );
558 // index 0 to 2 are added in getMessageParameters
559 for ( $i = 3; $i < $max; $i++ ) {
560 if ( !isset( $params[$i] ) ) {
561 $params[$i] = '';
562 }
563 }
564 }
565
566 return $params;
567 }
568
586 protected function getMessageParameters() {
587 if ( isset( $this->parsedParameters ) ) {
588 return $this->parsedParameters;
589 }
590
591 $entry = $this->entry;
592 $params = $this->extractParameters();
593 $params[0] = Message::rawParam( $this->getPerformerElement() );
594 $params[1] = $this->canView( LogPage::DELETED_USER ) ? $entry->getPerformerIdentity()->getName() : '';
595 $params[2] = Message::rawParam( $this->makePageLink( $entry->getTarget() ) );
596
597 // Bad things happens if the numbers are not in correct order
598 ksort( $params );
599
600 $this->parsedParameters = $params;
601 return $this->parsedParameters;
602 }
603
630 protected function formatParameterValue( $type, $value ) {
631 $saveLinkFlood = $this->linkFlood;
632
633 switch ( strtolower( trim( $type ) ) ) {
634 case 'raw':
635 $value = Message::rawParam( $value );
636 break;
637 case 'list':
638 $value = $this->context->getLanguage()->commaList( $value );
639 break;
640 case 'msg':
641 $value = $this->msg( $value )->text();
642 break;
643 case 'msg-content':
644 $value = $this->msg( $value )->inContentLanguage()->text();
645 break;
646 case 'number':
647 $value = Message::numParam( $value );
648 break;
649 case 'user':
650 $user = User::newFromName( $value );
651 $value = $user->getName();
652 break;
653 case 'user-link':
654 $this->setShowUserToolLinks( false );
655
656 $user = User::newFromName( $value );
657
658 if ( !$user ) {
659 $value = $this->msg( 'empty-username' )->text();
660 } else {
661 $value = Message::rawParam( $this->makeUserLink( $user ) );
662 $this->setShowUserToolLinks( $saveLinkFlood );
663 }
664 break;
665 case 'title':
666 $title = Title::newFromText( $value );
667 $value = $title->getPrefixedText();
668 break;
669 case 'title-link':
670 $title = Title::newFromText( $value );
671 $value = Message::rawParam( $this->makePageLink( $title ) );
672 break;
673 case 'plain':
674 // Plain text, nothing to do
675 default:
676 // Catch other types and use the old behavior (return as-is)
677 }
678
679 return $value;
680 }
681
692 protected function makePageLink( Title $title = null, $parameters = [], $html = null ) {
693 if ( !$title instanceof Title ) {
694 $msg = $this->msg( 'invalidtitle' )->text();
695 if ( $this->plaintext ) {
696 return $msg;
697 } else {
698 return Html::element( 'span', [ 'class' => 'mw-invalidtitle' ], $msg );
699 }
700 }
701
702 if ( $this->plaintext ) {
703 $link = '[[' . $title->getPrefixedText() . ']]';
704 } else {
705 $html = $html !== null ? new HtmlArmor( $html ) : $html;
706 $link = $this->getLinkRenderer()->makeLink( $title, $html, [], $parameters );
707 }
708
709 return $link;
710 }
711
718 public function getPerformerElement() {
719 if ( $this->canView( LogPage::DELETED_USER ) ) {
720 $performerIdentity = $this->entry->getPerformerIdentity();
721 $element = $this->makeUserLink( $performerIdentity );
722 if ( $this->entry->isDeleted( LogPage::DELETED_USER ) ) {
723 $element = $this->styleRestrictedElement( $element );
724 }
725 } else {
726 $element = $this->getRestrictedElement( 'rev-deleted-user' );
727 }
728
729 return $element;
730 }
731
737 public function getComment() {
738 if ( $this->canView( LogPage::DELETED_COMMENT ) ) {
739 $comment = MediaWikiServices::getInstance()->getCommentFormatter()
740 ->formatBlock( $this->entry->getComment() );
741 // No hard coded spaces thanx
742 $element = ltrim( $comment );
743 if ( $this->entry->isDeleted( LogPage::DELETED_COMMENT ) ) {
744 $element = $this->styleRestrictedElement( $element );
745 }
746 } else {
747 $element = $this->getRestrictedElement( 'rev-deleted-comment' );
748 }
749
750 return $element;
751 }
752
759 protected function getRestrictedElement( $message ) {
760 if ( $this->plaintext ) {
761 return $this->msg( $message )->text();
762 }
763
764 return $this->styleRestrictedElement( $this->msg( $message )->escaped() );
765 }
766
772 protected function styleRestrictedElement( $content ) {
773 if ( $this->plaintext ) {
774 return $content;
775 }
776 $attribs = [ 'class' => [ 'history-deleted' ] ];
777 if ( $this->entry->isDeleted( LogPage::DELETED_RESTRICTED ) ) {
778 $attribs['class'][] = 'mw-history-suppressed';
779 }
780
781 return Html::rawElement( 'span', $attribs, $content );
782 }
783
790 protected function msg( $key, ...$params ) {
791 return $this->context->msg( $key, ...$params );
792 }
793
800 protected function makeUserLink( UserIdentity $user, $toolFlags = 0 ) {
801 if ( $this->plaintext ) {
802 $element = $user->getName();
803 } else {
804 $element = Linker::userLink(
805 $user->getId(),
806 $user->getName()
807 );
808 if ( $this->linkFlood ) {
809 $editCount = $user->getId()
810 ? MediaWikiServices::getInstance()->getUserEditTracker()->getUserEditCount( $user )
811 : null;
812
813 $element .= Linker::userToolLinks(
814 $user->getId(),
815 $user->getName(),
816 true, // redContribsWhenNoEdits
817 $toolFlags,
818 $editCount,
819 // do not render parentheses in the HTML markup (CSS will provide)
820 false
821 );
822 }
823 }
824
825 return $element;
826 }
827
832 public function getPreloadTitles() {
833 return [];
834 }
835
840 // This function was added because getMessageParameters() is
841 // protected and a change from protected to public caused
842 // problems with extensions
843 return $this->getMessageParameters();
844 }
845
852 protected function getParametersForApi() {
853 return $this->entry->getParameters();
854 }
855
871 public function formatParametersForApi() {
872 $logParams = [];
873 foreach ( $this->getParametersForApi() as $key => $value ) {
874 $vals = explode( ':', $key, 3 );
875 if ( count( $vals ) !== 3 ) {
876 if ( $value instanceof __PHP_Incomplete_Class ) {
877 wfLogWarning( 'Log entry of type ' . $this->entry->getFullType() .
878 ' contains unrecoverable extra parameters.' );
879 continue;
880 }
881 $logParams[$key] = $value;
882 continue;
883 }
884 $logParams += $this->formatParameterValueForApi( $vals[2], $vals[1], $value );
885 }
886 ApiResult::setIndexedTagName( $logParams, 'param' );
887 ApiResult::setArrayType( $logParams, 'assoc' );
888
889 return $logParams;
890 }
891
901 protected function formatParameterValueForApi( $name, $type, $value ) {
902 $type = strtolower( trim( $type ) );
903 switch ( $type ) {
904 case 'bool':
905 $value = (bool)$value;
906 break;
907
908 case 'number':
909 if ( is_int( $value ) || ctype_digit( (string)$value ) ) {
910 $value = (int)$value;
911 } else {
912 $value = (float)$value;
913 }
914 break;
915
916 case 'array':
917 case 'assoc':
918 case 'kvp':
919 if ( is_array( $value ) ) {
920 ApiResult::setArrayType( $value, $type );
921 }
922 break;
923
924 case 'timestamp':
925 $value = wfTimestamp( TS_ISO_8601, $value );
926 break;
927
928 case 'msg':
929 case 'msg-content':
930 $msg = $this->msg( $value );
931 if ( $type === 'msg-content' ) {
932 $msg->inContentLanguage();
933 }
934 $value = [];
935 $value["{$name}_key"] = $msg->getKey();
936 if ( $msg->getParams() ) {
937 $value["{$name}_params"] = $msg->getParams();
938 }
939 $value["{$name}_text"] = $msg->text();
940 return $value;
941
942 case 'title':
943 case 'title-link':
944 $title = Title::newFromText( $value );
945 if ( !$title ) {
946 $title = SpecialPage::getTitleFor( 'Badtitle', $value );
947 }
948 $value = [];
949 ApiQueryBase::addTitleInfo( $value, $title, "{$name}_" );
950 return $value;
951
952 case 'user':
953 case 'user-link':
954 $user = User::newFromName( $value );
955 if ( $user ) {
956 $value = $user->getName();
957 }
958 break;
959
960 default:
961 // do nothing
962 break;
963 }
964
965 return [ $name => $value ];
966 }
967}
wfLogWarning( $msg, $callerOffset=1, $level=E_USER_WARNING)
Send a warning as a PHP error and the debug log.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Marks HTML that shouldn't be escaped.
Definition HtmlArmor.php:30
This class formats all log entries for log types which have not been converted to the new system.
Extends the LogEntry Interface with some basic functionality.
isLegacy()
Whether the parameters for this log are stored in new or old format.
Implements the default log formatting.
styleRestrictedElement( $content)
Helper method for styling restricted element.
LogEntryBase $entry
static newFromRow( $row)
Handy shortcut for constructing a formatter directly from database row.
canView( $field)
Check if a log item can be displayed.
bool $linkFlood
Whether to output user tool links.
setShowUserToolLinks( $value)
If set to true, will produce user tool links after the user name.
getActionLinks()
Returns extra links that comes after the action text, like "revert", etc.
static newFromEntry(LogEntry $entry)
Constructs a new formatter suitable for given entry.
array $parsedParameters
getMessageParametersForTesting()
__construct(LogEntry $entry)
bool $plaintext
Set to true if we are constructing a message text that is going to be included in page history or sen...
getRestrictedElement( $message)
Helper method for displaying restricted element.
formatParameterValue( $type, $value)
Formats parameters values dependent to their type.
getActionMessage()
Returns a sentence describing the log action.
const FOR_THIS_USER
getActionText()
Gets the log action, including username.
canViewLogType()
Check if a log item type can be displayed.
msg( $key,... $params)
Shortcut for wfMessage which honors local context.
getPerformerElement()
Provides the name of the user who performed the log action.
setLinkRenderer(LinkRenderer $linkRenderer)
formatParameterValueForApi( $name, $type, $value)
Format a single parameter value for API output.
IContextSource $context
Context for logging.
int $audience
Constant for handling log_deleted.
formatParametersForApi()
Format parameters for API output.
getComment()
Gets the user provided comment.
getParametersForApi()
Get the array of parameters, converted from legacy format if necessary.
makePageLink(Title $title=null, $parameters=[], $html=null)
Helper to make a link to the page, taking the plaintext value in consideration.
getMessageKey()
Returns a key to be used for formatting the action sentence.
makeUserLink(UserIdentity $user, $toolFlags=0)
setAudience( $audience)
Set the visibility restrictions for displaying content.
getIRCActionText()
Even uglier hack to maintain backwards compatibility with IRC bots (T36508).
setContext(IContextSource $context)
Replace the default context.
getIRCActionComment()
Even uglier hack to maintain backwards compatibility with IRC bots (T36508).
getPlainActionText()
Ugly hack to produce plaintext version of the message.
extractParameters()
Extracts the optional extra parameters for use in action messages.
getMessageParameters()
Formats parameters intended for action message from array of all parameters.
This class is a collection of static functions that serve two purposes:
Definition Html.php:57
Class that generates HTML for internal links.
Some internal bits split of from Skin.php.
Definition Linker.php:65
A class containing constants representing the names of configuration variables.
Service locator for MediaWiki core services.
Parent class for all special pages.
Represents a title within MediaWiki.
Definition Title.php:76
internal since 1.36
Definition User.php:98
The Message class deals with fetching and processing of interface message into a variety of formats.
Definition Message.php:144
static rawParam( $raw)
Definition Message.php:1143
static numParam( $num)
Definition Message.php:1154
Interface for objects which can provide a MediaWiki context on request.
An individual log entry.
Definition LogEntry.php:35
getPerformerIdentity()
getParameters()
Get the extra parameters stored for this message.
getTimestamp()
Get the timestamp when the action was executed.
getTarget()
Get the target page of this action.
getSubtype()
The log subtype.
getFullType()
The full logtype in format maintype/subtype.
getType()
The main log type.
Represents the target of a wiki link.
Interface for objects representing user identity.
getId( $wikiId=self::LOCAL)
$content
Definition router.php:76