mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
88da4cf399
commit
d21a49afb8
@ -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()]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user