X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flogging%2FBlockLogFormatter.php;h=a5af02691eb540fe80f2a5b439dfb0f8c9b1277e;hb=07078ae70ac1f341e2494685f99de60766545650;hp=c3902326c60782140952987411c5cf6fd6f618eb;hpb=127c0072c4d29902fbf2dcfd63464042462270ed;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/logging/BlockLogFormatter.php b/includes/logging/BlockLogFormatter.php index c3902326c6..a5af02691e 100644 --- a/includes/logging/BlockLogFormatter.php +++ b/includes/logging/BlockLogFormatter.php @@ -22,8 +22,6 @@ * @since 1.25 */ -use MediaWiki\MediaWikiServices; - /** * This class formats block log entries. * @@ -59,9 +57,15 @@ class BlockLogFormatter extends LogFormatter { // The lrm is needed to make sure that the number // is shown on the correct side of the tooltip text. $durationTooltip = '‎' . htmlspecialchars( $params[4] ); - $params[4] = Message::rawParam( "" . - $this->context->getLanguage()->translateBlockExpiry( $params[4], - $this->context->getUser() ) . '' ); + $params[4] = Message::rawParam( + "" . + $this->context->getLanguage()->translateBlockExpiry( + $params[4], + $this->context->getUser(), + wfTimestamp( TS_UNIX, $this->entry->getTimestamp() ) + ) . + '' + ); $params[5] = isset( $params[5] ) ? self::formatBlockFlags( $params[5], $this->context->getLanguage() ) : ''; } @@ -93,7 +97,7 @@ class BlockLogFormatter extends LogFormatter { public function getActionLinks() { $subtype = $this->entry->getSubtype(); - $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer(); + $linkRenderer = $this->getLinkRenderer(); if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) // Action is hidden || !( $subtype === 'block' || $subtype === 'reblock' ) || !$this->context->getUser()->isAllowed( 'block' )