MDL-46853 calendar: fix import of no duration events

This commit is contained in:
gdharris
2014-10-24 09:55:11 +13:00
committed by Sam Hemelryk
parent 89df18c73d
commit 04f7dcebe4
+1 -1
View File
@@ -2928,7 +2928,7 @@ function calendar_add_icalendar_event($event, $courseid, $subscriptionid, $timez
$timezone;
$eventrecord->timestart = strtotime($event->properties['DTSTART'][0]->value . ' ' . $tz);
if (empty($event->properties['DTEND'])) {
$eventrecord->timeduration = 3600; // one hour if no end time specified
$eventrecord->timeduration = 0; // no duration if no end time specified
} else {
$endtz = isset($event->properties['DTEND'][0]->parameters['TZID']) ? $event->properties['DTEND'][0]->parameters['TZID'] :
$timezone;