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:
Ingo Schommer 2009-01-18 23:07:51 +00:00
parent 54811abbd2
commit 095084fb22

View File

@ -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)
);