Merge "IP: Fix sanitization of IPv4 ranges"
[lhc/web/wiklou.git] / includes / Xml.php
index 7dcd4a4..10d0d8b 100644 (file)
@@ -214,10 +214,10 @@ class Xml {
                // a custom language code might not have a defined name...
                if ( !array_key_exists( $wgLanguageCode, $languages ) ) {
                        $languages[$wgLanguageCode] = $wgLanguageCode;
+                       // Sort the array again
+                       ksort( $languages );
                }
 
-               ksort( $languages );
-
                /**
                 * If a bogus value is set, default to the content language.
                 * Otherwise, no default is selected and the user ends up