From d887f0e1969307acb314e1062b4b30759a4bb832 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Thu, 29 Aug 2013 14:03:09 +1200 Subject: [PATCH] FIX EditableCountryDowndownField being broken by removal of Geoip in 3.0 --- code/model/formfields/EditableCountryDropdownField.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/model/formfields/EditableCountryDropdownField.php b/code/model/formfields/EditableCountryDropdownField.php index b9dee79..264a6e6 100644 --- a/code/model/formfields/EditableCountryDropdownField.php +++ b/code/model/formfields/EditableCountryDropdownField.php @@ -17,8 +17,8 @@ class EditableCountryDropdownField extends EditableFormField { public function getValueFromData($data) { if(isset($data[$this->Name])) { - - return Geoip::countryCode2name($data[$this->Name]); + $source = $this->getFormField()->getSource(); + return $source[$data[$this->Name]]; } }