diff options
author | kondou <kondou@ts.unde.re> | 2013-05-07 06:27:52 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-05-09 23:19:37 +0200 |
commit | ee1ce055fc6bbd543d31ef8c443bc379e7476e8d (patch) | |
tree | 68fc54dbe33804c2ff4f1dc1c9e5d84d2446b876 /settings/personal.php | |
parent | a983697e5bf4756bc410f445d57ef7cf6d21619f (diff) | |
download | nextcloud-server-ee1ce055fc6bbd543d31ef8c443bc379e7476e8d.tar.gz nextcloud-server-ee1ce055fc6bbd543d31ef8c443bc379e7476e8d.zip |
Fix #3251
Using ksort now, instead of prefilling the commonlanguages array.
Diffstat (limited to 'settings/personal.php')
-rw-r--r-- | settings/personal.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/settings/personal.php b/settings/personal.php index de029770d98..cab6e56dada 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -29,8 +29,7 @@ $commonlangcodes = array( $languageNames=include 'languageCodes.php'; $languages=array(); -// Initialize array, so we can substitue later with our in $commonlangcodes specified order -$commonlanguages = array_fill(0, count($commonlangcodes), ""); +$commonlanguages = array(); foreach($languageCodes as $lang) { $l=OC_L10N::get('settings', $lang); if(substr($l->t('__language_name__'), 0, 1)!='_') {//first check if the language name is in the translation file @@ -52,6 +51,8 @@ foreach($languageCodes as $lang) { } } +ksort($commonlanguages); + // sort now by displayed language not the iso-code usort( $languages, function ($a, $b) { return strcmp($a['name'], $b['name']); |