3 * Contains classes for formatting log entries
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
21 * @author Niklas Laxström
22 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
25 use MediaWiki\Linker\LinkRenderer
;
26 use MediaWiki\MediaWikiServices
;
29 * Implements the default log formatting.
31 * Can be overridden by subclassing and setting:
33 * $wgLogActionsHandlers['type/subtype'] = 'class'; or
34 * $wgLogActionsHandlers['type/*'] = 'class';
39 // Audience options for viewing usernames, comments, and actions
41 const FOR_THIS_USER
= 2;
46 * Constructs a new formatter suitable for given entry.
47 * @param LogEntry $entry
48 * @return LogFormatter
50 public static function newFromEntry( LogEntry
$entry ) {
51 global $wgLogActionsHandlers;
52 $fulltype = $entry->getFullType();
53 $wildcard = $entry->getType() . '/*';
56 if ( isset( $wgLogActionsHandlers[$fulltype] ) ) {
57 $handler = $wgLogActionsHandlers[$fulltype];
58 } elseif ( isset( $wgLogActionsHandlers[$wildcard] ) ) {
59 $handler = $wgLogActionsHandlers[$wildcard];
62 if ( $handler !== '' && is_string( $handler ) && class_exists( $handler ) ) {
63 return new $handler( $entry );
66 return new LegacyLogFormatter( $entry );
70 * Handy shortcut for constructing a formatter directly from
72 * @param stdClass|array $row
73 * @see DatabaseLogEntry::getSelectQueryData
74 * @return LogFormatter
76 public static function newFromRow( $row ) {
77 return self
::newFromEntry( DatabaseLogEntry
::newFromRow( $row ) );
82 /** @var LogEntryBase */
85 /** @var int Constant for handling log_deleted */
86 protected $audience = self
::FOR_PUBLIC
;
88 /** @var IContextSource Context for logging */
91 /** @var bool Whether to output user tool links */
92 protected $linkFlood = false;
95 * Set to true if we are constructing a message text that is going to
96 * be included in page history or send to IRC feed. Links are replaced
97 * with plaintext or with [[pagename]] kind of syntax, that is parsed
98 * by page histories and IRC feeds.
101 protected $plaintext = false;
104 protected $irctext = false;
107 * @var LinkRenderer|null
109 private $linkRenderer;
111 protected function __construct( LogEntry
$entry ) {
112 $this->entry
= $entry;
113 $this->context
= RequestContext
::getMain();
117 * Replace the default context
118 * @param IContextSource $context
120 public function setContext( IContextSource
$context ) {
121 $this->context
= $context;
126 * @param LinkRenderer $linkRenderer
128 public function setLinkRenderer( LinkRenderer
$linkRenderer ) {
129 $this->linkRenderer
= $linkRenderer;
134 * @return LinkRenderer
136 public function getLinkRenderer() {
137 if ( $this->linkRenderer
!== null ) {
138 return $this->linkRenderer
;
140 return MediaWikiServices
::getInstance()->getLinkRenderer();
145 * Set the visibility restrictions for displaying content.
146 * If set to public, and an item is deleted, then it will be replaced
147 * with a placeholder even if the context user is allowed to view it.
148 * @param int $audience Const self::FOR_THIS_USER or self::FOR_PUBLIC
150 public function setAudience( $audience ) {
151 $this->audience
= ( $audience == self
::FOR_THIS_USER
)
152 ? self
::FOR_THIS_USER
157 * Check if a log item can be displayed
158 * @param int $field LogPage::DELETED_* constant
161 protected function canView( $field ) {
162 if ( $this->audience
== self
::FOR_THIS_USER
) {
163 return LogEventsList
::userCanBitfield(
164 $this->entry
->getDeleted(), $field, $this->context
->getUser() );
166 return !$this->entry
->isDeleted( $field );
171 * If set to true, will produce user tool links after
172 * the user name. This should be replaced with generic
176 public function setShowUserToolLinks( $value ) {
177 $this->linkFlood
= $value;
181 * Ugly hack to produce plaintext version of the message.
182 * Usually you also want to set extraneous request context
183 * to avoid formatting for any particular user.
184 * @see getActionText()
185 * @return string Plain text
187 public function getPlainActionText() {
188 $this->plaintext
= true;
189 $text = $this->getActionText();
190 $this->plaintext
= false;
196 * Even uglier hack to maintain backwards compatibilty with IRC bots
198 * @see getActionText()
199 * @return string Text
201 public function getIRCActionComment() {
202 $actionComment = $this->getIRCActionText();
203 $comment = $this->entry
->getComment();
205 if ( $comment != '' ) {
206 if ( $actionComment == '' ) {
207 $actionComment = $comment;
209 $actionComment .= wfMessage( 'colon-separator' )->inContentLanguage()->text() . $comment;
213 return $actionComment;
217 * Even uglier hack to maintain backwards compatibilty with IRC bots
219 * @see getActionText()
220 * @return string Text
222 public function getIRCActionText() {
225 $this->plaintext
= true;
226 $this->irctext
= true;
228 $entry = $this->entry
;
229 $parameters = $entry->getParameters();
230 // @see LogPage::actionText()
231 // Text of title the action is aimed at.
232 $target = $entry->getTarget()->getPrefixedText();
234 switch ( $entry->getType() ) {
236 switch ( $entry->getSubtype() ) {
238 $movesource = $parameters['4::target'];
239 $text = wfMessage( '1movedto2' )
240 ->rawParams( $target, $movesource )->inContentLanguage()->escaped();
243 $movesource = $parameters['4::target'];
244 $text = wfMessage( '1movedto2_redir' )
245 ->rawParams( $target, $movesource )->inContentLanguage()->escaped();
247 case 'move-noredirect':
249 case 'move_redir-noredirect':
255 switch ( $entry->getSubtype() ) {
257 $text = wfMessage( 'deletedarticle' )
258 ->rawParams( $target )->inContentLanguage()->escaped();
261 $text = wfMessage( 'undeletedarticle' )
262 ->rawParams( $target )->inContentLanguage()->escaped();
264 // @codingStandardsIgnoreStart Long line
265 //case 'revision': // Revision deletion
266 //case 'event': // Log deletion
267 // see https://github.com/wikimedia/mediawiki/commit/a9c243b7b5289dad204278dbe7ed571fd914e395
269 // @codingStandardsIgnoreEnd
274 // @codingStandardsIgnoreStart Long line
275 // https://github.com/wikimedia/mediawiki/commit/1a05f8faf78675dc85984f27f355b8825b43efff
276 // @codingStandardsIgnoreEnd
277 // Create a diff link to the patrolled revision
278 if ( $entry->getSubtype() === 'patrol' ) {
279 $diffLink = htmlspecialchars(
280 wfMessage( 'patrol-log-diff', $parameters['4::curid'] )
281 ->inContentLanguage()->text() );
282 $text = wfMessage( 'patrol-log-line', $diffLink, "[[$target]]", "" )
283 ->inContentLanguage()->text();
290 switch ( $entry->getSubtype() ) {
292 $text = wfMessage( 'protectedarticle' )
293 ->rawParams( $target . ' ' . $parameters['4::description'] )->inContentLanguage()->escaped();
296 $text = wfMessage( 'unprotectedarticle' )
297 ->rawParams( $target )->inContentLanguage()->escaped();
300 $text = wfMessage( 'modifiedarticleprotection' )
301 ->rawParams( $target . ' ' . $parameters['4::description'] )->inContentLanguage()->escaped();
304 $text = wfMessage( 'movedarticleprotection' )
305 ->rawParams( $target, $parameters['4::oldtitle'] )->inContentLanguage()->escaped();
311 switch ( $entry->getSubtype() ) {
314 $text = wfMessage( 'newuserlog-create-entry' )
315 ->inContentLanguage()->escaped();
319 $text = wfMessage( 'newuserlog-create2-entry' )
320 ->rawParams( $target )->inContentLanguage()->escaped();
323 $text = wfMessage( 'newuserlog-autocreate-entry' )
324 ->inContentLanguage()->escaped();
330 switch ( $entry->getSubtype() ) {
332 $text = wfMessage( 'uploadedimage' )
333 ->rawParams( $target )->inContentLanguage()->escaped();
336 $text = wfMessage( 'overwroteimage' )
337 ->rawParams( $target )->inContentLanguage()->escaped();
343 if ( count( $parameters['4::oldgroups'] ) ) {
344 $oldgroups = implode( ', ', $parameters['4::oldgroups'] );
346 $oldgroups = wfMessage( 'rightsnone' )->inContentLanguage()->escaped();
348 if ( count( $parameters['5::newgroups'] ) ) {
349 $newgroups = implode( ', ', $parameters['5::newgroups'] );
351 $newgroups = wfMessage( 'rightsnone' )->inContentLanguage()->escaped();
353 switch ( $entry->getSubtype() ) {
355 $text = wfMessage( 'rightslogentry' )
356 ->rawParams( $target, $oldgroups, $newgroups )->inContentLanguage()->escaped();
359 $text = wfMessage( 'rightslogentry-autopromote' )
360 ->rawParams( $target, $oldgroups, $newgroups )->inContentLanguage()->escaped();
366 $text = wfMessage( 'pagemerge-logentry' )
367 ->rawParams( $target, $parameters['4::dest'], $parameters['5::mergepoint'] )
368 ->inContentLanguage()->escaped();
372 switch ( $entry->getSubtype() ) {
374 // Keep compatibility with extensions by checking for
375 // new key (5::duration/6::flags) or old key (0/optional 1)
376 if ( $entry->isLegacy() ) {
377 $rawDuration = $parameters[0];
378 $rawFlags = isset( $parameters[1] ) ?
$parameters[1] : '';
380 $rawDuration = $parameters['5::duration'];
381 $rawFlags = $parameters['6::flags'];
383 $duration = $wgContLang->translateBlockExpiry(
386 wfTimestamp( TS_UNIX
, $entry->getTimestamp() )
388 $flags = BlockLogFormatter
::formatBlockFlags( $rawFlags, $wgContLang );
389 $text = wfMessage( 'blocklogentry' )
390 ->rawParams( $target, $duration, $flags )->inContentLanguage()->escaped();
393 $text = wfMessage( 'unblocklogentry' )
394 ->rawParams( $target )->inContentLanguage()->escaped();
397 $duration = $wgContLang->translateBlockExpiry(
398 $parameters['5::duration'],
400 wfTimestamp( TS_UNIX
, $entry->getTimestamp() )
402 $flags = BlockLogFormatter
::formatBlockFlags( $parameters['6::flags'], $wgContLang );
403 $text = wfMessage( 'reblock-logentry' )
404 ->rawParams( $target, $duration, $flags )->inContentLanguage()->escaped();
410 switch ( $entry->getSubtype() ) {
412 $text = wfMessage( 'import-logentry-upload' )
413 ->rawParams( $target )->inContentLanguage()->escaped();
416 $text = wfMessage( 'import-logentry-interwiki' )
417 ->rawParams( $target )->inContentLanguage()->escaped();
421 // case 'suppress' --private log -- aaron (so we know who to blame in a few years :-D)
424 if ( is_null( $text ) ) {
425 $text = $this->getPlainActionText();
428 $this->plaintext
= false;
429 $this->irctext
= false;
435 * Gets the log action, including username.
436 * @return string HTML
438 public function getActionText() {
439 if ( $this->canView( LogPage
::DELETED_ACTION
) ) {
440 $element = $this->getActionMessage();
441 if ( $element instanceof Message
) {
442 $element = $this->plaintext ?
$element->text() : $element->escaped();
444 if ( $this->entry
->isDeleted( LogPage
::DELETED_ACTION
) ) {
445 $element = $this->styleRestricedElement( $element );
448 $sep = $this->msg( 'word-separator' );
449 $sep = $this->plaintext ?
$sep->text() : $sep->escaped();
450 $performer = $this->getPerformerElement();
451 $element = $performer . $sep . $this->getRestrictedElement( 'rev-deleted-event' );
458 * Returns a sentence describing the log action. Usually
459 * a Message object is returned, but old style log types
460 * and entries might return pre-escaped HTML string.
461 * @return Message|string Pre-escaped HTML
463 protected function getActionMessage() {
464 $message = $this->msg( $this->getMessageKey() );
465 $message->params( $this->getMessageParameters() );
471 * Returns a key to be used for formatting the action sentence.
472 * Default is logentry-TYPE-SUBTYPE for modern logs. Legacy log
473 * types will use custom keys, and subclasses can also alter the
474 * key depending on the entry itself.
475 * @return string Message key
477 protected function getMessageKey() {
478 $type = $this->entry
->getType();
479 $subtype = $this->entry
->getSubtype();
481 return "logentry-$type-$subtype";
485 * Returns extra links that comes after the action text, like "revert", etc.
489 public function getActionLinks() {
494 * Extracts the optional extra parameters for use in action messages.
495 * The array indexes start from number 3.
498 protected function extractParameters() {
499 $entry = $this->entry
;
502 if ( $entry->isLegacy() ) {
503 foreach ( $entry->getParameters() as $index => $value ) {
504 $params[$index +
3] = $value;
508 // Filter out parameters which are not in format #:foo
509 foreach ( $entry->getParameters() as $key => $value ) {
510 if ( strpos( $key, ':' ) === false ) {
513 list( $index, $type, ) = explode( ':', $key, 3 );
514 if ( ctype_digit( $index ) ) {
515 $params[$index - 1] = $this->formatParameterValue( $type, $value );
519 /* Message class doesn't like non consecutive numbering.
520 * Fill in missing indexes with empty strings to avoid
521 * incorrect renumbering.
523 if ( count( $params ) ) {
524 $max = max( array_keys( $params ) );
525 // index 0 to 2 are added in getMessageParameters
526 for ( $i = 3; $i < $max; $i++
) {
527 if ( !isset( $params[$i] ) ) {
537 * Formats parameters intented for action message from
538 * array of all parameters. There are three hardcoded
539 * parameters (array is zero-indexed, this list not):
540 * - 1: user name with premade link
541 * - 2: usable for gender magic function
542 * - 3: target page with premade link
545 protected function getMessageParameters() {
546 if ( isset( $this->parsedParameters
) ) {
547 return $this->parsedParameters
;
550 $entry = $this->entry
;
551 $params = $this->extractParameters();
552 $params[0] = Message
::rawParam( $this->getPerformerElement() );
553 $params[1] = $this->canView( LogPage
::DELETED_USER
) ?
$entry->getPerformer()->getName() : '';
554 $params[2] = Message
::rawParam( $this->makePageLink( $entry->getTarget() ) );
556 // Bad things happens if the numbers are not in correct order
559 $this->parsedParameters
= $params;
560 return $this->parsedParameters
;
564 * Formats parameters values dependent to their type
565 * @param string $type The type of the value.
566 * Valid are currently:
567 * * - (empty) or plain: The value is returned as-is
568 * * raw: The value will be added to the log message
569 * as raw parameter (e.g. no escaping)
570 * Use this only if there is no other working
571 * type like user-link or title-link
572 * * msg: The value is a message-key, the output is
573 * the message in user language
574 * * msg-content: The value is a message-key, the output
575 * is the message in content language
576 * * user: The value is a user name, e.g. for GENDER
577 * * user-link: The value is a user name, returns a
579 * * title: The value is a page title,
580 * returns name of page
581 * * title-link: The value is a page title,
582 * returns link to this page
583 * * number: Format value as number
584 * * list: Format value as a comma-separated list
585 * @param mixed $value The parameter value that should be formatted
586 * @return string|array Formated value
589 protected function formatParameterValue( $type, $value ) {
590 $saveLinkFlood = $this->linkFlood
;
592 switch ( strtolower( trim( $type ) ) ) {
594 $value = Message
::rawParam( $value );
597 $value = $this->context
->getLanguage()->commaList( $value );
600 $value = $this->msg( $value )->text();
603 $value = $this->msg( $value )->inContentLanguage()->text();
606 $value = Message
::numParam( $value );
609 $user = User
::newFromName( $value );
610 $value = $user->getName();
613 $this->setShowUserToolLinks( false );
615 $user = User
::newFromName( $value );
616 $value = Message
::rawParam( $this->makeUserLink( $user ) );
618 $this->setShowUserToolLinks( $saveLinkFlood );
621 $title = Title
::newFromText( $value );
622 $value = $title->getPrefixedText();
625 $title = Title
::newFromText( $value );
626 $value = Message
::rawParam( $this->makePageLink( $title ) );
629 // Plain text, nothing to do
631 // Catch other types and use the old behavior (return as-is)
638 * Helper to make a link to the page, taking the plaintext
639 * value in consideration.
640 * @param Title $title The page
641 * @param array $parameters Query parameters
642 * @param string|null $html Linktext of the link as raw html
643 * @throws MWException
646 protected function makePageLink( Title
$title = null, $parameters = [], $html = null ) {
647 if ( !$title instanceof Title
) {
648 throw new MWException( 'Expected title, got null' );
650 if ( !$this->plaintext
) {
651 $html = $html !== null ?
new HtmlArmor( $html ) : $html;
652 $link = $this->getLinkRenderer()->makeLink( $title, $html, [], $parameters );
654 $link = '[[' . $title->getPrefixedText() . ']]';
661 * Provides the name of the user who performed the log action.
662 * Used as part of log action message or standalone, depending
663 * which parts of the log entry has been hidden.
666 public function getPerformerElement() {
667 if ( $this->canView( LogPage
::DELETED_USER
) ) {
668 $performer = $this->entry
->getPerformer();
669 $element = $this->makeUserLink( $performer );
670 if ( $this->entry
->isDeleted( LogPage
::DELETED_USER
) ) {
671 $element = $this->styleRestricedElement( $element );
674 $element = $this->getRestrictedElement( 'rev-deleted-user' );
681 * Gets the user provided comment
682 * @return string HTML
684 public function getComment() {
685 if ( $this->canView( LogPage
::DELETED_COMMENT
) ) {
686 $comment = Linker
::commentBlock( $this->entry
->getComment() );
687 // No hard coded spaces thanx
688 $element = ltrim( $comment );
689 if ( $this->entry
->isDeleted( LogPage
::DELETED_COMMENT
) ) {
690 $element = $this->styleRestricedElement( $element );
693 $element = $this->getRestrictedElement( 'rev-deleted-comment' );
700 * Helper method for displaying restricted element.
701 * @param string $message
702 * @return string HTML or wiki text
704 protected function getRestrictedElement( $message ) {
705 if ( $this->plaintext
) {
706 return $this->msg( $message )->text();
709 $content = $this->msg( $message )->escaped();
710 $attribs = [ 'class' => 'history-deleted' ];
712 return Html
::rawElement( 'span', $attribs, $content );
716 * Helper method for styling restricted element.
717 * @param string $content
718 * @return string HTML or wiki text
720 protected function styleRestricedElement( $content ) {
721 if ( $this->plaintext
) {
724 $attribs = [ 'class' => 'history-deleted' ];
726 return Html
::rawElement( 'span', $attribs, $content );
730 * Shortcut for wfMessage which honors local context.
734 protected function msg( $key ) {
735 return $this->context
->msg( $key );
738 protected function makeUserLink( User
$user, $toolFlags = 0 ) {
739 if ( $this->plaintext
) {
740 $element = $user->getName();
742 $element = Linker
::userLink(
747 if ( $this->linkFlood
) {
748 $element .= Linker
::userToolLinks(
751 true, // redContribsWhenNoEdits
753 $user->getEditCount()
762 * @return array Array of titles that should be preloaded with LinkBatch
764 public function getPreloadTitles() {
769 * @return array Output of getMessageParameters() for testing
771 public function getMessageParametersForTesting() {
772 // This function was added because getMessageParameters() is
773 // protected and a change from protected to public caused
774 // problems with extensions
775 return $this->getMessageParameters();
779 * Get the array of parameters, converted from legacy format if necessary.
783 protected function getParametersForApi() {
784 return $this->entry
->getParameters();
788 * Format parameters for API output
790 * The result array should generally map named keys to values. Index and
791 * type should be omitted, e.g. "4::foo" should be returned as "foo" in the
792 * output. Values should generally be unformatted.
794 * Renames or removals of keys besides from the legacy numeric format to
795 * modern named style should be avoided. Any renames should be announced to
796 * the mediawiki-api-announce mailing list.
801 public function formatParametersForApi() {
803 foreach ( $this->getParametersForApi() as $key => $value ) {
804 $vals = explode( ':', $key, 3 );
805 if ( count( $vals ) !== 3 ) {
806 $logParams[$key] = $value;
809 $logParams +
= $this->formatParameterValueForApi( $vals[2], $vals[1], $value );
811 ApiResult
::setIndexedTagName( $logParams, 'param' );
812 ApiResult
::setArrayType( $logParams, 'assoc' );
818 * Format a single parameter value for API output
821 * @param string $name
822 * @param string $type
823 * @param string $value
826 protected function formatParameterValueForApi( $name, $type, $value ) {
827 $type = strtolower( trim( $type ) );
830 $value = (bool)$value;
834 if ( ctype_digit( $value ) ||
is_int( $value ) ) {
835 $value = (int)$value;
837 $value = (float)$value;
844 if ( is_array( $value ) ) {
845 ApiResult
::setArrayType( $value, $type );
850 $value = wfTimestamp( TS_ISO_8601
, $value );
855 $msg = $this->msg( $value );
856 if ( $type === 'msg-content' ) {
857 $msg->inContentLanguage();
860 $value["{$name}_key"] = $msg->getKey();
861 if ( $msg->getParams() ) {
862 $value["{$name}_params"] = $msg->getParams();
864 $value["{$name}_text"] = $msg->text();
869 $title = Title
::newFromText( $value );
871 // Huh? Do something halfway sane.
872 $title = SpecialPage
::getTitleFor( 'Badtitle', $value );
875 ApiQueryBase
::addTitleInfo( $value, $title, "{$name}_" );
880 $user = User
::newFromName( $value );
882 $value = $user->getName();
891 return [ $name => $value ];
896 * This class formats all log entries for log types
897 * which have not been converted to the new system.
898 * This is not about old log entries which store
899 * parameters in a different format - the new
900 * LogFormatter classes have code to support formatting
904 class LegacyLogFormatter
extends LogFormatter
{
906 * Backward compatibility for extension changing the comment from
907 * the LogLine hook. This will be set by the first call on getComment(),
908 * then it might be modified by the hook when calling getActionLinks(),
909 * so that the modified value will be returned when calling getComment()
914 private $comment = null;
917 * Cache for the result of getActionLinks() so that it does not need to
918 * run multiple times depending on the order that getComment() and
919 * getActionLinks() are called.
923 private $revert = null;
925 public function getComment() {
926 if ( $this->comment
=== null ) {
927 $this->comment
= parent
::getComment();
930 // Make sure we execute the LogLine hook so that we immediately return
931 // the correct value.
932 if ( $this->revert
=== null ) {
933 $this->getActionLinks();
936 return $this->comment
;
939 protected function getActionMessage() {
940 $entry = $this->entry
;
941 $action = LogPage
::actionText(
943 $entry->getSubtype(),
945 $this->plaintext ?
null : $this->context
->getSkin(),
946 (array)$entry->getParameters(),
947 !$this->plaintext
// whether to filter [[]] links
950 $performer = $this->getPerformerElement();
951 if ( !$this->irctext
) {
952 $sep = $this->msg( 'word-separator' );
953 $sep = $this->plaintext ?
$sep->text() : $sep->escaped();
954 $action = $performer . $sep . $action;
960 public function getActionLinks() {
961 if ( $this->revert
!== null ) {
962 return $this->revert
;
965 if ( $this->entry
->isDeleted( LogPage
::DELETED_ACTION
) ) {
967 return $this->revert
;
970 $title = $this->entry
->getTarget();
971 $type = $this->entry
->getType();
972 $subtype = $this->entry
->getSubtype();
974 // Do nothing. The implementation is handled by the hook modifiying the
975 // passed-by-ref parameters. This also changes the default value so that
976 // getComment() and getActionLinks() do not call them indefinitely.
979 // This is to populate the $comment member of this instance so that it
980 // can be modified when calling the hook just below.
981 if ( $this->comment
=== null ) {
985 $params = $this->entry
->getParameters();
987 Hooks
::run( 'LogLine', [ $type, $subtype, $title, $params,
988 &$this->comment
, &$this->revert
, $this->entry
->getTimestamp() ] );
990 return $this->revert
;