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 GPL-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;
112 * @see LogFormatter::getMessageParameters
115 protected $parsedParameters;
117 protected function __construct( LogEntry
$entry ) {
118 $this->entry
= $entry;
119 $this->context
= RequestContext
::getMain();
123 * Replace the default context
124 * @param IContextSource $context
126 public function setContext( IContextSource
$context ) {
127 $this->context
= $context;
132 * @param LinkRenderer $linkRenderer
134 public function setLinkRenderer( LinkRenderer
$linkRenderer ) {
135 $this->linkRenderer
= $linkRenderer;
140 * @return LinkRenderer
142 public function getLinkRenderer() {
143 if ( $this->linkRenderer
!== null ) {
144 return $this->linkRenderer
;
146 return MediaWikiServices
::getInstance()->getLinkRenderer();
151 * Set the visibility restrictions for displaying content.
152 * If set to public, and an item is deleted, then it will be replaced
153 * with a placeholder even if the context user is allowed to view it.
154 * @param int $audience Const self::FOR_THIS_USER or self::FOR_PUBLIC
156 public function setAudience( $audience ) {
157 $this->audience
= ( $audience == self
::FOR_THIS_USER
)
158 ? self
::FOR_THIS_USER
163 * Check if a log item can be displayed
164 * @param int $field LogPage::DELETED_* constant
167 protected function canView( $field ) {
168 if ( $this->audience
== self
::FOR_THIS_USER
) {
169 return LogEventsList
::userCanBitfield(
170 $this->entry
->getDeleted(), $field, $this->context
->getUser() );
172 return !$this->entry
->isDeleted( $field );
177 * If set to true, will produce user tool links after
178 * the user name. This should be replaced with generic
182 public function setShowUserToolLinks( $value ) {
183 $this->linkFlood
= $value;
187 * Ugly hack to produce plaintext version of the message.
188 * Usually you also want to set extraneous request context
189 * to avoid formatting for any particular user.
190 * @see getActionText()
191 * @return string Plain text
193 public function getPlainActionText() {
194 $this->plaintext
= true;
195 $text = $this->getActionText();
196 $this->plaintext
= false;
202 * Even uglier hack to maintain backwards compatibility with IRC bots
204 * @see getActionText()
205 * @return string Text
207 public function getIRCActionComment() {
208 $actionComment = $this->getIRCActionText();
209 $comment = $this->entry
->getComment();
211 if ( $comment != '' ) {
212 if ( $actionComment == '' ) {
213 $actionComment = $comment;
215 $actionComment .= wfMessage( 'colon-separator' )->inContentLanguage()->text() . $comment;
219 return $actionComment;
223 * Even uglier hack to maintain backwards compatibility with IRC bots
225 * @see getActionText()
226 * @return string Text
228 public function getIRCActionText() {
231 $this->plaintext
= true;
232 $this->irctext
= true;
234 $entry = $this->entry
;
235 $parameters = $entry->getParameters();
236 // @see LogPage::actionText()
237 // Text of title the action is aimed at.
238 $target = $entry->getTarget()->getPrefixedText();
240 switch ( $entry->getType() ) {
242 switch ( $entry->getSubtype() ) {
244 $movesource = $parameters['4::target'];
245 $text = wfMessage( '1movedto2' )
246 ->rawParams( $target, $movesource )->inContentLanguage()->escaped();
249 $movesource = $parameters['4::target'];
250 $text = wfMessage( '1movedto2_redir' )
251 ->rawParams( $target, $movesource )->inContentLanguage()->escaped();
253 case 'move-noredirect':
255 case 'move_redir-noredirect':
261 switch ( $entry->getSubtype() ) {
263 $text = wfMessage( 'deletedarticle' )
264 ->rawParams( $target )->inContentLanguage()->escaped();
267 $text = wfMessage( 'undeletedarticle' )
268 ->rawParams( $target )->inContentLanguage()->escaped();
270 //case 'revision': // Revision deletion
271 //case 'event': // Log deletion
272 // see https://github.com/wikimedia/mediawiki/commit/a9c243b7b5289dad204278dbe7ed571fd914e395
278 // https://github.com/wikimedia/mediawiki/commit/1a05f8faf78675dc85984f27f355b8825b43efff
279 // Create a diff link to the patrolled revision
280 if ( $entry->getSubtype() === 'patrol' ) {
281 $diffLink = htmlspecialchars(
282 wfMessage( 'patrol-log-diff', $parameters['4::curid'] )
283 ->inContentLanguage()->text() );
284 $text = wfMessage( 'patrol-log-line', $diffLink, "[[$target]]", "" )
285 ->inContentLanguage()->text();
292 switch ( $entry->getSubtype() ) {
294 $text = wfMessage( 'protectedarticle' )
295 ->rawParams( $target . ' ' . $parameters['4::description'] )->inContentLanguage()->escaped();
298 $text = wfMessage( 'unprotectedarticle' )
299 ->rawParams( $target )->inContentLanguage()->escaped();
302 $text = wfMessage( 'modifiedarticleprotection' )
303 ->rawParams( $target . ' ' . $parameters['4::description'] )->inContentLanguage()->escaped();
306 $text = wfMessage( 'movedarticleprotection' )
307 ->rawParams( $target, $parameters['4::oldtitle'] )->inContentLanguage()->escaped();
313 switch ( $entry->getSubtype() ) {
316 $text = wfMessage( 'newuserlog-create-entry' )
317 ->inContentLanguage()->escaped();
321 $text = wfMessage( 'newuserlog-create2-entry' )
322 ->rawParams( $target )->inContentLanguage()->escaped();
325 $text = wfMessage( 'newuserlog-autocreate-entry' )
326 ->inContentLanguage()->escaped();
332 switch ( $entry->getSubtype() ) {
334 $text = wfMessage( 'uploadedimage' )
335 ->rawParams( $target )->inContentLanguage()->escaped();
338 $text = wfMessage( 'overwroteimage' )
339 ->rawParams( $target )->inContentLanguage()->escaped();
345 if ( count( $parameters['4::oldgroups'] ) ) {
346 $oldgroups = implode( ', ', $parameters['4::oldgroups'] );
348 $oldgroups = wfMessage( 'rightsnone' )->inContentLanguage()->escaped();
350 if ( count( $parameters['5::newgroups'] ) ) {
351 $newgroups = implode( ', ', $parameters['5::newgroups'] );
353 $newgroups = wfMessage( 'rightsnone' )->inContentLanguage()->escaped();
355 switch ( $entry->getSubtype() ) {
357 $text = wfMessage( 'rightslogentry' )
358 ->rawParams( $target, $oldgroups, $newgroups )->inContentLanguage()->escaped();
361 $text = wfMessage( 'rightslogentry-autopromote' )
362 ->rawParams( $target, $oldgroups, $newgroups )->inContentLanguage()->escaped();
368 $text = wfMessage( 'pagemerge-logentry' )
369 ->rawParams( $target, $parameters['4::dest'], $parameters['5::mergepoint'] )
370 ->inContentLanguage()->escaped();
374 switch ( $entry->getSubtype() ) {
376 // Keep compatibility with extensions by checking for
377 // new key (5::duration/6::flags) or old key (0/optional 1)
378 if ( $entry->isLegacy() ) {
379 $rawDuration = $parameters[0];
380 $rawFlags = $parameters[1] ??
'';
382 $rawDuration = $parameters['5::duration'];
383 $rawFlags = $parameters['6::flags'];
385 $duration = $wgContLang->translateBlockExpiry(
388 wfTimestamp( TS_UNIX
, $entry->getTimestamp() )
390 $flags = BlockLogFormatter
::formatBlockFlags( $rawFlags, $wgContLang );
391 $text = wfMessage( 'blocklogentry' )
392 ->rawParams( $target, $duration, $flags )->inContentLanguage()->escaped();
395 $text = wfMessage( 'unblocklogentry' )
396 ->rawParams( $target )->inContentLanguage()->escaped();
399 $duration = $wgContLang->translateBlockExpiry(
400 $parameters['5::duration'],
402 wfTimestamp( TS_UNIX
, $entry->getTimestamp() )
404 $flags = BlockLogFormatter
::formatBlockFlags( $parameters['6::flags'], $wgContLang );
405 $text = wfMessage( 'reblock-logentry' )
406 ->rawParams( $target, $duration, $flags )->inContentLanguage()->escaped();
412 switch ( $entry->getSubtype() ) {
414 $text = wfMessage( 'import-logentry-upload' )
415 ->rawParams( $target )->inContentLanguage()->escaped();
418 $text = wfMessage( 'import-logentry-interwiki' )
419 ->rawParams( $target )->inContentLanguage()->escaped();
423 // case 'suppress' --private log -- aaron (so we know who to blame in a few years :-D)
426 if ( is_null( $text ) ) {
427 $text = $this->getPlainActionText();
430 $this->plaintext
= false;
431 $this->irctext
= false;
437 * Gets the log action, including username.
438 * @return string HTML
440 public function getActionText() {
441 if ( $this->canView( LogPage
::DELETED_ACTION
) ) {
442 $element = $this->getActionMessage();
443 if ( $element instanceof Message
) {
444 $element = $this->plaintext ?
$element->text() : $element->escaped();
446 if ( $this->entry
->isDeleted( LogPage
::DELETED_ACTION
) ) {
447 $element = $this->styleRestricedElement( $element );
450 $sep = $this->msg( 'word-separator' );
451 $sep = $this->plaintext ?
$sep->text() : $sep->escaped();
452 $performer = $this->getPerformerElement();
453 $element = $performer . $sep . $this->getRestrictedElement( 'rev-deleted-event' );
460 * Returns a sentence describing the log action. Usually
461 * a Message object is returned, but old style log types
462 * and entries might return pre-escaped HTML string.
463 * @return Message|string Pre-escaped HTML
465 protected function getActionMessage() {
466 $message = $this->msg( $this->getMessageKey() );
467 $message->params( $this->getMessageParameters() );
473 * Returns a key to be used for formatting the action sentence.
474 * Default is logentry-TYPE-SUBTYPE for modern logs. Legacy log
475 * types will use custom keys, and subclasses can also alter the
476 * key depending on the entry itself.
477 * @return string Message key
479 protected function getMessageKey() {
480 $type = $this->entry
->getType();
481 $subtype = $this->entry
->getSubtype();
483 return "logentry-$type-$subtype";
487 * Returns extra links that comes after the action text, like "revert", etc.
491 public function getActionLinks() {
496 * Extracts the optional extra parameters for use in action messages.
497 * The array indexes start from number 3.
500 protected function extractParameters() {
501 $entry = $this->entry
;
504 if ( $entry->isLegacy() ) {
505 foreach ( $entry->getParameters() as $index => $value ) {
506 $params[$index +
3] = $value;
510 // Filter out parameters which are not in format #:foo
511 foreach ( $entry->getParameters() as $key => $value ) {
512 if ( strpos( $key, ':' ) === false ) {
515 list( $index, $type, ) = explode( ':', $key, 3 );
516 if ( ctype_digit( $index ) ) {
517 $params[$index - 1] = $this->formatParameterValue( $type, $value );
521 /* Message class doesn't like non consecutive numbering.
522 * Fill in missing indexes with empty strings to avoid
523 * incorrect renumbering.
525 if ( count( $params ) ) {
526 $max = max( array_keys( $params ) );
527 // index 0 to 2 are added in getMessageParameters
528 for ( $i = 3; $i < $max; $i++
) {
529 if ( !isset( $params[$i] ) ) {
539 * Formats parameters intented for action message from
540 * array of all parameters. There are three hardcoded
541 * parameters (array is zero-indexed, this list not):
542 * - 1: user name with premade link
543 * - 2: usable for gender magic function
544 * - 3: target page with premade link
547 protected function getMessageParameters() {
548 if ( isset( $this->parsedParameters
) ) {
549 return $this->parsedParameters
;
552 $entry = $this->entry
;
553 $params = $this->extractParameters();
554 $params[0] = Message
::rawParam( $this->getPerformerElement() );
555 $params[1] = $this->canView( LogPage
::DELETED_USER
) ?
$entry->getPerformer()->getName() : '';
556 $params[2] = Message
::rawParam( $this->makePageLink( $entry->getTarget() ) );
558 // Bad things happens if the numbers are not in correct order
561 $this->parsedParameters
= $params;
562 return $this->parsedParameters
;
566 * Formats parameters values dependent to their type
567 * @param string $type The type of the value.
568 * Valid are currently:
569 * * - (empty) or plain: The value is returned as-is
570 * * raw: The value will be added to the log message
571 * as raw parameter (e.g. no escaping)
572 * Use this only if there is no other working
573 * type like user-link or title-link
574 * * msg: The value is a message-key, the output is
575 * the message in user language
576 * * msg-content: The value is a message-key, the output
577 * is the message in content language
578 * * user: The value is a user name, e.g. for GENDER
579 * * user-link: The value is a user name, returns a
581 * * title: The value is a page title,
582 * returns name of page
583 * * title-link: The value is a page title,
584 * returns link to this page
585 * * number: Format value as number
586 * * list: Format value as a comma-separated list
587 * @param mixed $value The parameter value that should be formatted
588 * @return string|array Formated value
591 protected function formatParameterValue( $type, $value ) {
592 $saveLinkFlood = $this->linkFlood
;
594 switch ( strtolower( trim( $type ) ) ) {
596 $value = Message
::rawParam( $value );
599 $value = $this->context
->getLanguage()->commaList( $value );
602 $value = $this->msg( $value )->text();
605 $value = $this->msg( $value )->inContentLanguage()->text();
608 $value = Message
::numParam( $value );
611 $user = User
::newFromName( $value );
612 $value = $user->getName();
615 $this->setShowUserToolLinks( false );
617 $user = User
::newFromName( $value );
618 $value = Message
::rawParam( $this->makeUserLink( $user ) );
620 $this->setShowUserToolLinks( $saveLinkFlood );
623 $title = Title
::newFromText( $value );
624 $value = $title->getPrefixedText();
627 $title = Title
::newFromText( $value );
628 $value = Message
::rawParam( $this->makePageLink( $title ) );
631 // Plain text, nothing to do
633 // Catch other types and use the old behavior (return as-is)
640 * Helper to make a link to the page, taking the plaintext
641 * value in consideration.
642 * @param Title|null $title The page
643 * @param array $parameters Query parameters
644 * @param string|null $html Linktext of the link as raw html
647 protected function makePageLink( Title
$title = null, $parameters = [], $html = null ) {
648 if ( !$title instanceof Title
) {
649 $msg = $this->msg( 'invalidtitle' )->text();
650 if ( !$this->plaintext
) {
651 return Html
::element( 'span', [ 'class' => 'mw-invalidtitle' ], $msg );
657 if ( !$this->plaintext
) {
658 $html = $html !== null ?
new HtmlArmor( $html ) : $html;
659 $link = $this->getLinkRenderer()->makeLink( $title, $html, [], $parameters );
661 $link = '[[' . $title->getPrefixedText() . ']]';
668 * Provides the name of the user who performed the log action.
669 * Used as part of log action message or standalone, depending
670 * which parts of the log entry has been hidden.
673 public function getPerformerElement() {
674 if ( $this->canView( LogPage
::DELETED_USER
) ) {
675 $performer = $this->entry
->getPerformer();
676 $element = $this->makeUserLink( $performer );
677 if ( $this->entry
->isDeleted( LogPage
::DELETED_USER
) ) {
678 $element = $this->styleRestricedElement( $element );
681 $element = $this->getRestrictedElement( 'rev-deleted-user' );
688 * Gets the user provided comment
689 * @return string HTML
691 public function getComment() {
692 if ( $this->canView( LogPage
::DELETED_COMMENT
) ) {
693 $comment = Linker
::commentBlock( $this->entry
->getComment() );
694 // No hard coded spaces thanx
695 $element = ltrim( $comment );
696 if ( $this->entry
->isDeleted( LogPage
::DELETED_COMMENT
) ) {
697 $element = $this->styleRestricedElement( $element );
700 $element = $this->getRestrictedElement( 'rev-deleted-comment' );
707 * Helper method for displaying restricted element.
708 * @param string $message
709 * @return string HTML or wiki text
711 protected function getRestrictedElement( $message ) {
712 if ( $this->plaintext
) {
713 return $this->msg( $message )->text();
716 $content = $this->msg( $message )->escaped();
717 $attribs = [ 'class' => 'history-deleted' ];
719 return Html
::rawElement( 'span', $attribs, $content );
723 * Helper method for styling restricted element.
724 * @param string $content
725 * @return string HTML or wiki text
727 protected function styleRestricedElement( $content ) {
728 if ( $this->plaintext
) {
731 $attribs = [ 'class' => 'history-deleted' ];
733 return Html
::rawElement( 'span', $attribs, $content );
737 * Shortcut for wfMessage which honors local context.
741 protected function msg( $key ) {
742 return $this->context
->msg( $key );
745 protected function makeUserLink( User
$user, $toolFlags = 0 ) {
746 if ( $this->plaintext
) {
747 $element = $user->getName();
749 $element = Linker
::userLink(
754 if ( $this->linkFlood
) {
755 $element .= Linker
::userToolLinks(
758 true, // redContribsWhenNoEdits
760 $user->getEditCount()
769 * @return array Array of titles that should be preloaded with LinkBatch
771 public function getPreloadTitles() {
776 * @return array Output of getMessageParameters() for testing
778 public function getMessageParametersForTesting() {
779 // This function was added because getMessageParameters() is
780 // protected and a change from protected to public caused
781 // problems with extensions
782 return $this->getMessageParameters();
786 * Get the array of parameters, converted from legacy format if necessary.
790 protected function getParametersForApi() {
791 return $this->entry
->getParameters();
795 * Format parameters for API output
797 * The result array should generally map named keys to values. Index and
798 * type should be omitted, e.g. "4::foo" should be returned as "foo" in the
799 * output. Values should generally be unformatted.
801 * Renames or removals of keys besides from the legacy numeric format to
802 * modern named style should be avoided. Any renames should be announced to
803 * the mediawiki-api-announce mailing list.
808 public function formatParametersForApi() {
810 foreach ( $this->getParametersForApi() as $key => $value ) {
811 $vals = explode( ':', $key, 3 );
812 if ( count( $vals ) !== 3 ) {
813 $logParams[$key] = $value;
816 $logParams +
= $this->formatParameterValueForApi( $vals[2], $vals[1], $value );
818 ApiResult
::setIndexedTagName( $logParams, 'param' );
819 ApiResult
::setArrayType( $logParams, 'assoc' );
825 * Format a single parameter value for API output
828 * @param string $name
829 * @param string $type
830 * @param string $value
833 protected function formatParameterValueForApi( $name, $type, $value ) {
834 $type = strtolower( trim( $type ) );
837 $value = (bool)$value;
841 if ( ctype_digit( $value ) ||
is_int( $value ) ) {
842 $value = (int)$value;
844 $value = (float)$value;
851 if ( is_array( $value ) ) {
852 ApiResult
::setArrayType( $value, $type );
857 $value = wfTimestamp( TS_ISO_8601
, $value );
862 $msg = $this->msg( $value );
863 if ( $type === 'msg-content' ) {
864 $msg->inContentLanguage();
867 $value["{$name}_key"] = $msg->getKey();
868 if ( $msg->getParams() ) {
869 $value["{$name}_params"] = $msg->getParams();
871 $value["{$name}_text"] = $msg->text();
876 $title = Title
::newFromText( $value );
878 // Huh? Do something halfway sane.
879 $title = SpecialPage
::getTitleFor( 'Badtitle', $value );
882 ApiQueryBase
::addTitleInfo( $value, $title, "{$name}_" );
887 $user = User
::newFromName( $value );
889 $value = $user->getName();
898 return [ $name => $value ];
903 * This class formats all log entries for log types
904 * which have not been converted to the new system.
905 * This is not about old log entries which store
906 * parameters in a different format - the new
907 * LogFormatter classes have code to support formatting
911 class LegacyLogFormatter
extends LogFormatter
{
913 * Backward compatibility for extension changing the comment from
914 * the LogLine hook. This will be set by the first call on getComment(),
915 * then it might be modified by the hook when calling getActionLinks(),
916 * so that the modified value will be returned when calling getComment()
921 private $comment = null;
924 * Cache for the result of getActionLinks() so that it does not need to
925 * run multiple times depending on the order that getComment() and
926 * getActionLinks() are called.
930 private $revert = null;
932 public function getComment() {
933 if ( $this->comment
=== null ) {
934 $this->comment
= parent
::getComment();
937 // Make sure we execute the LogLine hook so that we immediately return
938 // the correct value.
939 if ( $this->revert
=== null ) {
940 $this->getActionLinks();
943 return $this->comment
;
946 protected function getActionMessage() {
947 $entry = $this->entry
;
948 $action = LogPage
::actionText(
950 $entry->getSubtype(),
952 $this->plaintext ?
null : $this->context
->getSkin(),
953 (array)$entry->getParameters(),
954 !$this->plaintext
// whether to filter [[]] links
957 $performer = $this->getPerformerElement();
958 if ( !$this->irctext
) {
959 $sep = $this->msg( 'word-separator' );
960 $sep = $this->plaintext ?
$sep->text() : $sep->escaped();
961 $action = $performer . $sep . $action;
967 public function getActionLinks() {
968 if ( $this->revert
!== null ) {
969 return $this->revert
;
972 if ( $this->entry
->isDeleted( LogPage
::DELETED_ACTION
) ) {
974 return $this->revert
;
977 $title = $this->entry
->getTarget();
978 $type = $this->entry
->getType();
979 $subtype = $this->entry
->getSubtype();
981 // Do nothing. The implementation is handled by the hook modifiying the
982 // passed-by-ref parameters. This also changes the default value so that
983 // getComment() and getActionLinks() do not call them indefinitely.
986 // This is to populate the $comment member of this instance so that it
987 // can be modified when calling the hook just below.
988 if ( $this->comment
=== null ) {
992 $params = $this->entry
->getParameters();
994 Hooks
::run( 'LogLine', [ $type, $subtype, $title, $params,
995 &$this->comment
, &$this->revert
, $this->entry
->getTimestamp() ] );
997 return $this->revert
;