BUGFIX: #2510 - Fix setting of default country on CountryDropdownField

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@57764 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-07-10 23:18:38 +00:00
parent aa1a72ff04
commit 60a24885b8

View File

@ -6,8 +6,11 @@
* @subpackage fields-relational * @subpackage fields-relational
*/ */
class CountryDropdownField extends DropdownField { class CountryDropdownField extends DropdownField {
function __construct($name, $title) { function __construct($name, $title, $source = null, $value = "") {
parent::__construct($name, $title, Geoip::getCountryDropDown()); if(!is_array($source)) {
$source = Geoip::getCountryDropDown();
}
parent::__construct($name, $title, $source);
} }
function Field() { function Field() {