]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix the loop to search al the available languages, not only the las element.
authorSergi Almacellas Abellana <sergi@koolpi.com>
Sun, 9 Dec 2012 19:21:04 +0000 (20:21 +0100)
committerSergi Almacellas Abellana <sergi@koolpi.com>
Sun, 9 Dec 2012 19:21:04 +0000 (20:21 +0100)
lib/l10n.php

index 4f9c3a0edef109eaf5be11a62494d9ed686127d1..b83d8ff86db265a59d46cc51a56e1c6f1f7e706b 100644 (file)
@@ -298,10 +298,10 @@ class OC_L10N{
                                if( ($key = array_search($temp[0], $available)) !== false) {
                                        return $available[$key];
                                }
-                       }
-                       foreach($available as $l) {
-                               if ( $temp[0] == substr($l,0,2) ) {
-                                       return $l;
+                               foreach($available as $l) {
+                                       if ( $temp[0] == substr($l,0,2) ) {
+                                               return $l;
+                                       }
                                }
                        }
                }