Fix log message for blocks without duration

Very old blocks form 2004 have not any log_params and therefor enforce a
duration of infinite to be shown on Special:Log.

Follow-Up: Ibc7fcaa5a952ff90d42a6477da4baa429f3de64b
Change-Id: I4bdfab1ff865501a780ed0c7c50e2b1bab467a4b
This commit is contained in:
umherirrender 2015-03-13 15:16:32 +01:00
parent 94ac4bb9b7
commit 52bf90f41c

View file

@ -48,6 +48,10 @@ class BlockLogFormatter extends LogFormatter {
$subtype = $this->entry->getSubtype();
if ( $subtype === 'block' || $subtype === 'reblock' ) {
if ( !isset( $params[4] ) ) {
// Very old log entry without duration: means infinite
$params[4] = 'infinite';
}
// Localize the duration, and add a tooltip
// in English to help visitors from other wikis.
// The lrm is needed to make sure that the number