FIX can not access private static variables of i18n

This commit is contained in:
Jeremy Thomerson 2013-05-31 19:09:03 +00:00
parent 22c5098f8e
commit 929beb216c

View File

@ -1508,7 +1508,9 @@ class Translatable extends DataExtension implements PermissionProvider {
$dbLangs = $query->execute()->column(); $dbLangs = $query->execute()->column();
$langlist = array_merge((array)Translatable::default_locale(), (array)$dbLangs); $langlist = array_merge((array)Translatable::default_locale(), (array)$dbLangs);
$returnMap = array(); $returnMap = array();
$allCodes = array_merge(i18n::$all_locales, i18n::$common_locales); $allLocales = Config::inst()->get('i18n', 'all_locales');
$commonLocales = Config::inst()->get('i18n', 'common_locales');
$allCodes = array_merge($allLocales, $commonLocales);
foreach ($langlist as $langCode) { foreach ($langlist as $langCode) {
if($langCode && isset($allCodes[$langCode])) { if($langCode && isset($allCodes[$langCode])) {
if(is_array($allCodes[$langCode])) { if(is_array($allCodes[$langCode])) {