Ticket #2510 (closed patch: fixed)

Opened 8 months ago

Last modified 4 months ago

CountryDropdownField patch

Reported by: mandrew Owned by: sminnee
Priority: medium Milestone:
Component: Sapphire Framework Version: 2.2.2-rc3
Severity: medium effort / impact Keywords:
Cc: Hours:

Description

This is how we should be setting the country dropdown field. Please add this to the core so we can set the default country manually when geoip gets confused or wrong.

class CountryDropdownField? extends DropdownField? {

function construct($name, $title, $source = null, $value = "") {

if(!is_array($source)) {

$source = Geoip::getCountryDropDown();

}

parent::construct($name, $title, Geoip::getCountryDropDown(), $value);

}

function Field() {

if(!$this->value !$this->source[$this->value]) $this->value = Geoip::visitor_country(); return parent::Field();

}

}

Change History

Changed 6 months ago by sminnee

Merged in r57771.

Changed 4 months ago by aoneil

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.