From f98938d71f179f057bb68d2bc46e5f60a5993e78 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Tue, 27 Oct 2009 17:36:26 +0000 Subject: [PATCH] Consistency tweak: 'show'/'hide' should be linked only like other filter panels on RC/WL etc. --- includes/specials/SpecialWhatlinkshere.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index 6c0ceee20c..b63c0eee2a 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -396,6 +396,11 @@ class SpecialWhatLinksHere extends SpecialPage { return $f; } + /** + * Create filter panel + * + * @return string HTML fieldset and filter panel with the show/hide links + */ function getFilterPanel() { global $wgLang; $show = wfMsgHtml( 'show' ); @@ -408,11 +413,14 @@ class SpecialWhatLinksHere extends SpecialPage { $types = array( 'hidetrans', 'hidelinks', 'hideredirs' ); if( $this->target->getNamespace() == NS_FILE ) $types[] = 'hideimages'; + + // Combined message keys: 'whatlinkshere-hideredirs', 'whatlinkshere-hidetrans', 'whatlinkshere-hidelinks', 'whatlinkshere-hideimages' + // To be sure they will be find by grep foreach( $types as $type ) { $chosen = $this->opts->getValue( $type ); - $msg = wfMsgHtml( "whatlinkshere-{$type}", $chosen ? $show : $hide ); + $msg = $chosen ? $show : $hide; $overrides = array( $type => !$chosen ); - $links[] = $this->makeSelfLink( $msg, array_merge( $changed, $overrides ) ); + $links[] = wfMsgHtml( "whatlinkshere-{$type}", $this->makeSelfLink( $msg, array_merge( $changed, $overrides ) ) ); } return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), $wgLang->pipeList( $links ) ); } -- 2.20.1