LogEventsList: Add backwards-compatibility for log-show-hide messages
authorPrateek Saxena <prtksxna@gmail.com>
Wed, 18 Jul 2018 04:19:36 +0000 (09:49 +0530)
committerPrateek Saxena <prtksxna@gmail.com>
Wed, 18 Jul 2018 04:19:36 +0000 (09:49 +0530)
Also updated the release notes.

Bug: T199657
Change-Id: I027effbc7bd797ee241281ddd57334a5dc5c8a57

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 a7620fe..846d595 100644 (file)
@@ -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;