Using Config API to retrieve core values (fixes #103)

Required for 3.1 compat
This commit is contained in:
Ingo Schommer 2013-03-26 00:49:58 +01:00
parent 2dff101b45
commit a3ff187938

View File

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