From: Prateek Saxena Date: Wed, 18 Jul 2018 04:19:36 +0000 (+0530) Subject: LogEventsList: Add backwards-compatibility for log-show-hide messages X-Git-Tag: 1.34.0-rc.0~4718^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/supprimer.php?a=commitdiff_plain;h=cab5b3afc72510f52b8135a20912c9319d1be97e;p=lhc%2Fweb%2Fwiklou.git LogEventsList: Add backwards-compatibility for log-show-hide messages Also updated the release notes. Bug: T199657 Change-Id: I027effbc7bd797ee241281ddd57334a5dc5c8a57 --- diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index c2dbd9d9c1..79f5bf9d9a 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -275,6 +275,8 @@ because of Phabricator reports. override this methods. * SearchEngine::replacePrefixes( $query ) should no longer be called prior to running searchText/searchTitle. +* (T199657) Messages for $wgFilterLogTypes labels should be no longer be in the + 'log-show-hide-[type]' format. Instead use 'logeventslist-[type]-log'. === Other changes in 1.32 === * (T198811) The following tables have had their UNIQUE indexes turned into diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index a7620fedd6..846d595dc9 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -195,7 +195,12 @@ class LogEventsList extends ContextSource { $options = []; $default = []; foreach ( $filter as $type => $val ) { - $options[ $this->msg( "logeventslist-{$type}-log" )->text() ] = $type; + $message = $this->msg( "logeventslist-{$type}-log" ); + // FIXME: Remove this check once T199657 is fully resolved. + if ( !$message->exists() ) { + $message = $this->msg( "log-show-hide-{$type}" )->params( $this->msg( 'show' )->text() ); + } + $options[ $message->text() ] = $type; if ( $val === 0 ) { $default[] = $type;