aboutsummaryrefslogtreecommitdiffstats
path: root/includes/logging
diff options
context:
space:
mode:
authorumherirrender <umherirrender_de.wp@web.de>2016-04-05 19:11:00 +0200
committerumherirrender <umherirrender_de.wp@web.de>2016-04-09 20:57:33 +0200
commitafd72226b86d3f029dcc12aa7d07304da646c60c (patch)
tree3d8e9a03be61e2d79901f67d7ac8b24eb2634d26 /includes/logging
parent84abebcd939e6bf121228653c19aa8189d18fb5b (diff)
downloadmediawikicore-afd72226b86d3f029dcc12aa7d07304da646c60c.tar.gz
mediawikicore-afd72226b86d3f029dcc12aa7d07304da646c60c.zip
Show absolute block expiry in user timezone on block logs
For this add an user parameter to Language::translateBlockExpiry. This allows the function to display the absolute block expiry in the user's time zone. Use this when formatting block log entries. This also avoids the use of $wgUser Bug: T131241 Change-Id: If0a1d3c88bb4242a016eb9b2df115413de786149
Diffstat (limited to 'includes/logging')
-rw-r--r--includes/logging/BlockLogFormatter.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/logging/BlockLogFormatter.php b/includes/logging/BlockLogFormatter.php
index aa90d1d36966..21e40ec5fa05 100644
--- a/includes/logging/BlockLogFormatter.php
+++ b/includes/logging/BlockLogFormatter.php
@@ -58,7 +58,8 @@ class BlockLogFormatter extends LogFormatter {
// is shown on the correct side of the tooltip text.
$durationTooltip = '&lrm;' . htmlspecialchars( $params[4] );
$params[4] = Message::rawParam( "<span class='blockExpiry' title='$durationTooltip'>" .
- $this->context->getLanguage()->translateBlockExpiry( $params[4] ) . '</span>' );
+ $this->context->getLanguage()->translateBlockExpiry( $params[4],
+ $this->context->getUser() ) . '</span>' );
$params[5] = isset( $params[5] ) ?
self::formatBlockFlags( $params[5], $this->context->getLanguage() ) : '';
}