$formDescriptor['subtype'] = $this->getActionSelectorDesc( $types, $action );
}
- $htmlForm = new HTMLForm( $formDescriptor, $this->getContext() );
+ $context = new DerivativeContext( $this->getContext() );
+ $context->setTitle( $title ); // Remove subpage
+ $htmlForm = new HTMLForm( $formDescriptor, $context );
$htmlForm
->setSubmitText( $this->msg( 'logeventslist-submit' )->text() )
->setMethod( 'get' )
$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 === false ) {
$default[] = $type;
// Let extensions add data
Hooks::run( 'LogEventsListLineEnding', [ $this, &$ret, $entry, &$classes, &$attribs ] );
- $attribs = wfArrayFilterByKey( $attribs, [ Sanitizer::class, 'isReservedDataAttribute' ] );
+ $attribs = array_filter( $attribs,
+ [ Sanitizer::class, 'isReservedDataAttribute' ],
+ ARRAY_FILTER_USE_KEY
+ );
$attribs['class'] = implode( ' ', $classes );
return Html::rawElement( 'li', $attribs, $ret ) . "\n";