r52561 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52560‎ | r52561 | r52562 >
Date:17:40, 29 June 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
Do no unnecessary show the helping translation if it is the same as in current language. This happens especially for people who work with multiple languages.
Modified paths:
  • /trunk/extensions/Translate/TranslateEditAddons.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslateEditAddons.php
@@ -138,7 +138,9 @@
139139
140140 $preference = $wgUser->getOption( 'translate-editlangs' );
141141 if ( $preference !== 'default' ) {
142 - return array_map( 'trim', explode( ',', $preference ) );
 142+ $fallbacks = array_map( 'trim', explode( ',', $preference ) );
 143+ foreach( $fallbacks as $k => $v ) if ( $v === $code ) unset($fallbacks[$k]);
 144+ return $fallbacks;
143145 }
144146
145147 $fallbacks = array();

Status & tagging log