Commit 9fb46651 authored by Robert Rollins's avatar Robert Rollins

Issue #2564909: The country name will now be rendered properly from an Address Field.

Thanks go to user pc-wurm for discovering this bug. Being in the United States,
I hadn't noticed that "US" was actually the country code, rather than the
country name, which is what Date iCal should have been rendering into the
LOCATION field.
parent 7cb3e411
......@@ -256,6 +256,12 @@ class date_ical_plugin_row_ical_entity extends views_plugin_row {
// Concatenate street and house number
$location_field['thoroughfare'] = implode(' ', array($location_field['thoroughfare'], $location_field['premise']));
unset($location_field['premise']);
// Get full country name
if (!empty($location_field['country'])) {
require_once DRUPAL_ROOT . '/includes/locale.inc';
$countries = country_get_list();
$location_field['country'] = $countries[$location_field['country']];
}
foreach ($location_field as $key => $loc) {
if ($loc && !in_array($key, array('first_name', 'last_name'))) {
$locations[] = $loc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment