mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Using array_diff_key() instead of array_diff() in LanguageDropdownField to avoid language with existing translations showing up in the "available translations" dropdown for page CMS fields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70321 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
54811abbd2
commit
095084fb22
@ -20,8 +20,9 @@ class LanguageDropdownField extends GroupedDropdownField {
|
||||
Translatable::get_existing_content_languages($translatingClass),
|
||||
$dontInclude
|
||||
);
|
||||
|
||||
// we accept in dontInclude both language codes and names, so another diff is required
|
||||
$usedlangs = array_diff(
|
||||
$usedlangs = array_diff_key(
|
||||
$usedlangs,
|
||||
array_flip($dontInclude)
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user