Fix the loop to search al the available languages, not only the las element.

This commit is contained in:
Sergi Almacellas Abellana 2012-12-09 20:21:04 +01:00
parent b810e42cc7
commit 7b0e2b348b
1 changed files with 4 additions and 4 deletions

View 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;
}
}
}
}