X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRecentchanges.php;h=c3ce78e3013c0991605ce99881a5ab6f868e81ea;hp=f4135a4d615b6d04ac3a3ed5f01486b7a0b3fcb1;hb=b31c87ab91b3e2bbb80d3b814953ea3790498c36;hpb=b52657059ea1a6ad1868af3a46db30ed3c64334a diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index f4135a4d61..c3ce78e301 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -915,40 +915,32 @@ class SpecialRecentChanges extends ChangesListSpecialPage { $links = []; - $filterGroups = $this->getFilterGroups(); - - foreach ( $filterGroups as $groupName => $group ) { - if ( !$group->isPerGroupRequestParameter() ) { - foreach ( $group->getFilters() as $key => $filter ) { - if ( $filter->displaysOnUnstructuredUi( $this ) ) { - $msg = $filter->getShowHide(); - $linkMessage = $this->msg( $msg . '-' . $showhide[1 - $options[$key]] ); - // Extensions can define additional filters, but don't need to define the corresponding - // messages. If they don't exist, just fall back to 'show' and 'hide'. - if ( !$linkMessage->exists() ) { - $linkMessage = $this->msg( $showhide[1 - $options[$key]] ); - } - - $link = $this->makeOptionsLink( $linkMessage->text(), - [ $key => 1 - $options[$key] ], $nondefaults ); - - $attribs = [ - 'class' => "$msg rcshowhideoption clshowhideoption", - 'data-filter-name' => $filter->getName(), - ]; - - if ( $filter->isFeatureAvailableOnStructuredUi( $this ) ) { - $attribs['data-feature-in-structured-ui'] = true; - } - - $links[] = Html::rawElement( - 'span', - $attribs, - $this->msg( $msg )->rawParams( $link )->escaped() - ); - } - } + foreach ( $this->getLegacyShowHideFilters() as $key => $filter ) { + $msg = $filter->getShowHide(); + $linkMessage = $this->msg( $msg . '-' . $showhide[1 - $options[$key]] ); + // Extensions can define additional filters, but don't need to define the corresponding + // messages. If they don't exist, just fall back to 'show' and 'hide'. + if ( !$linkMessage->exists() ) { + $linkMessage = $this->msg( $showhide[1 - $options[$key]] ); + } + + $link = $this->makeOptionsLink( $linkMessage->text(), + [ $key => 1 - $options[$key] ], $nondefaults ); + + $attribs = [ + 'class' => "$msg rcshowhideoption clshowhideoption", + 'data-filter-name' => $filter->getName(), + ]; + + if ( $filter->isFeatureAvailableOnStructuredUi( $this ) ) { + $attribs['data-feature-in-structured-ui'] = true; } + + $links[] = Html::rawElement( + 'span', + $attribs, + $this->msg( $msg )->rawParams( $link )->escaped() + ); } // show from this onward link