Fixed ticket #85: Dropdown on /status/CMS should be sorted alphabetically. Now all language dropdowns are sorted by language name rather than language code (merged from branches/gsoc)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42576 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-09-25 21:57:54 +00:00
parent ff9a292d51
commit 0e968ca308

View File

@ -41,7 +41,9 @@ class LanguageDropdownField extends GroupedDropdownField {
));
if (isset($alllangs[Translatable::default_lang()])) unset($alllangs[Translatable::default_lang()]);
asort($alllangs);
if (count($usedlangs)) {
asort($usedlangs);
parent::__construct($name, $title, array(
"Used languages" => $usedlangs,
"Other languages" => $alllangs