Merge "Skip loading PHP shims for JSON i18n files"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 17 Apr 2014 14:29:33 +0000 (14:29 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 17 Apr 2014 14:29:33 +0000 (14:29 +0000)
includes/cache/LocalisationCache.php

index b89316b..9cee321 100644 (file)
@@ -875,17 +875,15 @@ class LocalisationCache {
                }
 
                foreach ( $wgExtensionMessagesFiles as $extension => $fileName ) {
+                       if ( isset( $wgMessagesDirs[$extension] ) ) {
+                               # Already loaded the JSON files for this extension; skip the PHP shim
+                               continue;
+                       }
+
                        $data = $this->readPHPFile( $fileName, 'extension' );
                        $used = false;
 
                        foreach ( $data as $key => $item ) {
-                               if ( $key === 'messages' && isset( $wgMessagesDirs[$extension] ) ) {
-                                       # For backwards compatibility, ignore messages from extensions in
-                                       # $wgExtensionMessagesFiles that are also present in $wgMessagesDirs.
-                                       # This allows extensions to use both and be backwards compatible.
-                                       # Variables other than $messages still need to be supported though.
-                                       continue;
-                               }
                                if ( $this->mergeExtensionItem( $codeSequence, $key, $allData[$key], $item ) ) {
                                        $used = true;
                                }