r58204 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58203‎ | r58204 | r58205 >
Date:17:36, 27 October 2009
Author:raymond
Status:ok
Tags:
Comment:
Consistency tweak: 'show'/'hide' should be linked only like other filter panels on RC/WL etc.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialWhatlinkshere.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php
@@ -396,6 +396,11 @@
397397 return $f;
398398 }
399399
 400+ /**
 401+ * Create filter panel
 402+ *
 403+ * @return string HTML fieldset and filter panel with the show/hide links
 404+ */
400405 function getFilterPanel() {
401406 global $wgLang;
402407 $show = wfMsgHtml( 'show' );
@@ -408,11 +413,14 @@
409414 $types = array( 'hidetrans', 'hidelinks', 'hideredirs' );
410415 if( $this->target->getNamespace() == NS_FILE )
411416 $types[] = 'hideimages';
 417+
 418+ // Combined message keys: 'whatlinkshere-hideredirs', 'whatlinkshere-hidetrans', 'whatlinkshere-hidelinks', 'whatlinkshere-hideimages'
 419+ // To be sure they will be find by grep
412420 foreach( $types as $type ) {
413421 $chosen = $this->opts->getValue( $type );
414 - $msg = wfMsgHtml( "whatlinkshere-{$type}", $chosen ? $show : $hide );
 422+ $msg = $chosen ? $show : $hide;
415423 $overrides = array( $type => !$chosen );
416 - $links[] = $this->makeSelfLink( $msg, array_merge( $changed, $overrides ) );
 424+ $links[] = wfMsgHtml( "whatlinkshere-{$type}", $this->makeSelfLink( $msg, array_merge( $changed, $overrides ) ) );
417425 }
418426 return Xml::fieldset( wfMsg( 'whatlinkshere-filters' ), $wgLang->pipeList( $links ) );
419427 }

Status & tagging log