Allow VTODO in uploaded collections.

This commit is contained in:
Maxime Delorme 2007-05-08 23:55:42 +12:00 committed by Andrew McMillan
parent 8f048389b3
commit 879838a88a

View File

@ -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;