r72963 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72962‎ | r72963 | r72964 >
Date:09:30, 14 September 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Random cleanups
Modified paths:
  • /trunk/extensions/Translate/TranslateEditAddons.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslateEditAddons.php
@@ -23,13 +23,6 @@
2424 static function addNavigation( &$outputpage, &$text ) {
2525 global $wgUser, $wgTitle;
2626
27 - static $done = false;
28 - if ( $done ) {
29 - return true;
30 - }
31 -
32 - $done = true;
33 -
3427 if ( !self::isMessageNamespace( $wgTitle ) ) {
3528 return true;
3629 }
@@ -241,13 +234,7 @@
242235 $group = $wgRequest->getText( 'loadgroup', '' );
243236 $mg = MessageGroups::getGroup( $group );
244237
245 - /**
246 - * If we were not given group, or the group given was meta...
247 - */
248 - if ( is_null( $mg ) || $mg->isMeta() ) {
249 - /**
250 - * .. then try harder, because meta groups are *inefficient*.
251 - */
 238+ if ( $mg === null ) {
252239 $group = TranslateUtils::messageKeyToGroup( $namespace, $key );
253240 if ( $group ) {
254241 $mg = MessageGroups::getGroup( $group );
@@ -314,7 +301,7 @@
315302 * @return \bool If title is in a message namespace.
316303 */
317304 public static function isMessageNamespace( Title $title ) {
318 - global $wgTranslateMessageNamespaces; ;
 305+ global $wgTranslateMessageNamespaces;
319306
320307 $namespace = $title->getNamespace();
321308

Status & tagging log