Commit 4c691496 authored by Robert Rollins's avatar Robert Rollins

Issue #2369109: Fixed a bug with the way RDATEs are generated in exported iCal feeds.

Previously, the time value was pulled from the Date field, rather than the
RDATE field. Now it'll pull from the RDATE field if it has a time, and fall
back on the Date field if RDATE doesn't.
parent 43202cf7
......@@ -291,11 +291,11 @@ class date_ical_plugin_style_ical_feed extends views_plugin_style {
'year' => $addition_array['year'],
'month' => $addition_array['month'],
'day' => $addition_array['day'],
// Use the time information from the start date, since Date
// doesn't store time info for RDATEs.
'hour' => $start['hour'],
'min' => $start['minute'],
'second' => $start['second'],
// If the user's copy of Date has support for time in RDATEs,
// use that. Otherwise use the time from the start date.
'hour' => isset($addition_array['hour']) ? $addition_array['hour'] : $start['hour'],
'min' => isset($addition_array['minute']) ? $addition_array['minute'] : $start['minute'],
'second' => isset($addition_array['second']) ? $addition_array['second'] : $start['second'],
'tz' => $start['tz']->getName(),
);
......@@ -308,10 +308,11 @@ class date_ical_plugin_style_ical_feed extends views_plugin_style {
'year' => $addition_array['year'],
'month' => $addition_array['month'],
'day' => $addition_array['day'],
// Use the time information from the end date.
'hour' => $end['hour'],
'min' => $end['minute'],
'second' => $end['second'],
// If the user's copy of Date has support for time in RDATEs,
// use that. Otherwise use the time from the end date.
'hour' => isset($addition_array['hour']) ? $addition_array['hour'] : $end['hour'],
'min' => isset($addition_array['minute']) ? $addition_array['minute'] : $end['minute'],
'second' => isset($addition_array['second']) ? $addition_array['second'] : $end['second'],
'tz' => $end['tz']->getName(),
);
$rdate = $rdate_with_end;
......
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