From a3ff187938119a12facb2c02b385bb373f188677 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 26 Mar 2013 00:49:58 +0100 Subject: [PATCH] Using Config API to retrieve core values (fixes #103) Required for 3.1 compat --- code/model/Translatable.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/model/Translatable.php b/code/model/Translatable.php index 8d435ef..4b0eb70 100755 --- a/code/model/Translatable.php +++ b/code/model/Translatable.php @@ -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])) {