BUGFIX array_flip() for $usedLangs was not necessary any more (delivered as indexed array)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43780 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-10-24 04:27:54 +00:00
parent 88da4cf399
commit d21a49afb8

View File

@ -20,10 +20,10 @@ class LanguageDropdownField extends GroupedDropdownField {
$dontInclude
);
// we accept in dontInclude both language codes and names, so another diff is required
$usedlangs = array_flip(array_diff(
array_flip($usedlangs),
$dontInclude
));
$usedlangs = array_diff(
$usedlangs,
array_flip($dontInclude)
);
if (isset($usedlangs[Translatable::default_lang()])) unset($usedlangs[Translatable::default_lang()]);