Merge "LogEventsList: Add backwards-compatibility for log-show-hide messages"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 18 Jul 2018 21:03:59 +0000 (21:03 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 18 Jul 2018 21:03:59 +0000 (21:03 +0000)
RELEASE-NOTES-1.32
includes/logging/LogEventsList.php

index c2dbd9d..79f5bf9 100644 (file)
@@ -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
index aecbce9..305f9aa 100644 (file)
@@ -196,7 +196,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;