http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72963

Revision: 72963
Author:   nikerabbit
Date:     2010-09-14 09:30:04 +0000 (Tue, 14 Sep 2010)

Log Message:
-----------
Random cleanups

Modified Paths:
--------------
    trunk/extensions/Translate/TranslateEditAddons.php

Modified: trunk/extensions/Translate/TranslateEditAddons.php
===================================================================
--- trunk/extensions/Translate/TranslateEditAddons.php  2010-09-14 09:27:31 UTC 
(rev 72962)
+++ trunk/extensions/Translate/TranslateEditAddons.php  2010-09-14 09:30:04 UTC 
(rev 72963)
@@ -23,13 +23,6 @@
        static function addNavigation( &$outputpage, &$text ) {
                global $wgUser, $wgTitle;
 
-               static $done = false;
-               if ( $done ) {
-                       return true;
-               }
-
-               $done = true;
-
                if ( !self::isMessageNamespace( $wgTitle ) ) {
                        return true;
                }
@@ -241,13 +234,7 @@
                $group = $wgRequest->getText( 'loadgroup', '' );
                $mg = MessageGroups::getGroup( $group );
 
-               /**
-                * If we were not given group, or the group given was meta...
-                */
-               if ( is_null( $mg ) || $mg->isMeta() ) {
-                       /**
-                        * .. then try harder, because meta groups are 
*inefficient*.
-                        */
+               if ( $mg === null ) {
                        $group = TranslateUtils::messageKeyToGroup( $namespace, 
$key );
                        if ( $group ) {
                                $mg = MessageGroups::getGroup( $group );
@@ -314,7 +301,7 @@
         * @return \bool If title is in a message namespace.
         */
        public static function isMessageNamespace( Title $title ) {
-               global $wgTranslateMessageNamespaces; ;
+               global $wgTranslateMessageNamespaces;
 
                $namespace = $title->getNamespace();
 



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to