Merge "user: Allow "CAS update failed" exceptions to be normalised"
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderImage.php
index 0adbd0c..d9c369d 100644 (file)
@@ -140,13 +140,9 @@ class ResourceLoaderImage {
                        if ( isset( $desc['lang'][$contextLang] ) ) {
                                return $this->basePath . '/' . $desc['lang'][$contextLang];
                        }
-                       $fallbacks = Language::getFallbacksFor( $contextLang );
+                       $fallbacks = Language::getFallbacksFor( $contextLang, Language::STRICT_FALLBACKS );
                        foreach ( $fallbacks as $lang ) {
-                               // Images will fallback to 'default' instead of 'en', except for 'en-*' variants
-                               if (
-                                       ( $lang !== 'en' || substr( $contextLang, 0, 3 ) === 'en-' ) &&
-                                       isset( $desc['lang'][$lang] )
-                               ) {
+                               if ( isset( $desc['lang'][$lang] ) ) {
                                        return $this->basePath . '/' . $desc['lang'][$lang];
                                }
                        }