Commit 425b8d5f authored by KevinPaxman's avatar KevinPaxman Committed by Robert Rollins

Issue #2150071: Added support for the Location module. Thanks, kpaxman!

parent 009ebcfe
......@@ -332,6 +332,7 @@ function _date_ical_get_location_fields($base = 'node') {
'text_with_summary',
'node_reference',
'addressfield',
'location'
);
if (!$info || !in_array($info['type'], $supported_location_fields)) {
continue;
......
......@@ -259,6 +259,24 @@ class date_ical_plugin_row_ical_entity extends views_plugin_row {
}
$location = implode(', ', array_reverse($locations));
}
elseif ($location_info['type'] == 'location') {
$included_fields = array(
'name',
'additional',
'street',
'city',
'province_name',
'postal_code',
'country_name'
);
$location_data = array();
foreach ($included_fields as $included_field) {
if (!empty($location_field[$included_field])) {
$locations_data[] = $location_field[$included_field];
}
}
$location = check_plain(implode(', ', $location_data));
}
else {
$location = check_plain($location_field['value']);
}
......
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