From 1371622b154f1584e85ccfe75994b062ed039217 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 6 May 2013 17:50:25 +1200 Subject: [PATCH] FIX: Fix i18n config access to work with 3.1 --- code/model/Translatable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/model/Translatable.php b/code/model/Translatable.php index b6bc768..d1c4020 100755 --- a/code/model/Translatable.php +++ b/code/model/Translatable.php @@ -1457,11 +1457,11 @@ 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])) { - $returnMap[$langCode] = $allCodes[$langCode][0]; + $returnMap[$langCode] = $allCodes[$langCode]['name']; } else { $returnMap[$langCode] = $allCodes[$langCode]; }