diff --git a/inc/caldav-PUT-collection.php b/inc/caldav-PUT-collection.php index ca33aea1..4ede3464 100644 --- a/inc/caldav-PUT-collection.php +++ b/inc/caldav-PUT-collection.php @@ -18,7 +18,7 @@ $tzid = 'unknown'; foreach( $lines AS $lno => $line ) { dbg_error_log( "PUT", "CalendarLine[%04d] - %s: %s", $lno, $state, $line ); if ( $state == "" ) { - if ( preg_match( '/^BEGIN:(VEVENT|VTIMEZONE)$/', $line, $matches ) ) { + if ( preg_match( '/^BEGIN:(VEVENT|VTIMEZONE|VTODO)$/', $line, $matches ) ) { $current .= $line."\n"; $state = $matches[1]; } @@ -30,6 +30,9 @@ foreach( $lines AS $lno => $line ) { case 'VEVENT': $events[] = array( 'data' => $current, 'tzid' => $tzid ); break; + case 'VTODO': + $events[] = array( 'data' => $current, 'tzid' => $tzid ); + break; case 'VTIMEZONE': $timezones[$tzid] = $current; break;