MDL-46853 calendar: fix import of no duration events

This commit is contained in:
gdharris
2014-10-24 11:48:20 +02:00
committed by Eloy Lafuente (stronk7)
parent 0255780b9c
commit ee19ae694a
+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;