diff --git a/inc/WritableCollection.php b/inc/WritableCollection.php index 0b69bf48..b3c32b9d 100644 --- a/inc/WritableCollection.php +++ b/inc/WritableCollection.php @@ -124,15 +124,9 @@ class WritableCollection extends DAVResource { return false; } - $dtstart = $first->GetPValue('DTSTART'); - $calitem_params[':dtstart'] = $dtstart; - if ( (!isset($dtstart) || $dtstart == '') && $first->GetPValue('DUE') != '' ) { - $dtstart = $first->GetPValue('DUE'); - } - $dtend = $first->GetPValue('DTEND'); if ( isset($dtend) && $dtend != '' ) { - dbg_error_log( 'PUT', ' DTEND: "%s", DTSTART: "%s", DURATION: "%s"', $dtend, $dtstart, $first->GetPValue('DURATION') ); + dbg_error_log( 'PUT', ' DTEND: "%s", DTSTART: "%s", DURATION: "%s"', $dtend, $first->GetPValue('DTSTART'), $first->GetPValue('DURATION') ); $calitem_params[':dtend'] = $dtend; $dtend = ':dtend'; } @@ -203,22 +197,23 @@ class WritableCollection extends DAVResource { if ( $created == '00001231T000000Z' ) $created = '20001231T000000Z'; $calitem_params[':created'] = $created; - $calitem_params[':tzid'] = $tzid; - $calitem_params[':uid'] = $uid; - $calitem_params[':summary'] = $first->GetPValue('SUMMARY'); - $calitem_params[':location'] = $first->GetPValue('LOCATION'); - $calitem_params[':transp'] = $first->GetPValue('TRANSP'); - $calitem_params[':description'] = $first->GetPValue('DESCRIPTION'); + $calitem_params[':tzid'] = $tzid; + $calitem_params[':uid'] = $uid; + $calitem_params[':url'] = $first->GetPValue('URL'); + $calitem_params[':due'] = $first->GetPValue('DUE'); $calitem_params[':rrule'] = $first->GetPValue('RRULE'); - $calitem_params[':url'] = $first->GetPValue('URL'); + $calitem_params[':dtstart'] = $first->GetPValue('DTSTART'); + $calitem_params[':summary'] = $first->GetPValue('SUMMARY'); + $calitem_params[':location'] = $first->GetPValue('LOCATION'); + $calitem_params[':transp'] = $first->GetPValue('TRANSP'); + $calitem_params[':status'] = $first->GetPValue('STATUS'); $calitem_params[':priority'] = $first->GetPValue('PRIORITY'); - $calitem_params[':due'] = $first->GetPValue('DUE'); + $calitem_params[':description'] = $first->GetPValue('DESCRIPTION'); $calitem_params[':percent_complete'] = $first->GetPValue('PERCENT-COMPLETE'); - $calitem_params[':status'] = $first->GetPValue('STATUS'); $range = getVCalendarRange($vcal, $this->timezone_name()); - $calitem_params[':first_instance_start'] = isset($range->from) ? $range->from->UTC() : null; - $calitem_params[':last_instance_end'] = isset($range->until) ? $range->until->UTC() : null; + $calitem_params[':first_instance_start'] = isset($range->from) ? $range->from->UTC() : null; + $calitem_params[':last_instance_end'] = isset($range->until) ? $range->until->UTC() : null; if ( $create_resource ) { $sql = << @@ -19,7 +19,6 @@ CALSCALE:GREGORIAN BEGIN:VTODO UID:19920901T130000Z-123407@host.com DTSTAMP:19920901T130000Z -DTSTART:19920415T133000Z DUE:19920516T045959Z SUMMARY:Status is set to COMPLETED, empty URL, CLASS set CLASS:PUBLIC diff --git a/testing/tests/regression-suite/2504-is-defined-REPORT-is-not-defined-URL.result b/testing/tests/regression-suite/2504-is-defined-REPORT-is-not-defined-URL.result index 09318d02..4915d675 100644 --- a/testing/tests/regression-suite/2504-is-defined-REPORT-is-not-defined-URL.result +++ b/testing/tests/regression-suite/2504-is-defined-REPORT-is-not-defined-URL.result @@ -2,8 +2,8 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy -ETag: "c073b3f2dd8d609971aaafee83aa4002" -Content-Length: 1321 +ETag: "50cac5fed58d0f6d00abd3453b758f25" +Content-Length: 1295 Content-Type: text/xml; charset="utf-8" @@ -43,7 +43,6 @@ CALSCALE:GREGORIAN BEGIN:VTODO UID:19920901T130000Z-123407@host.com DTSTAMP:19920901T130000Z -DTSTART:19920415T133000Z DUE:19920516T045959Z SUMMARY:Status is set to COMPLETED, empty URL, CLASS set CLASS:PUBLIC diff --git a/testing/tests/regression-suite/2505-is-defined-REPORT-is-defined-DUE.result b/testing/tests/regression-suite/2505-is-defined-REPORT-is-defined-DUE.result index 09318d02..4915d675 100644 --- a/testing/tests/regression-suite/2505-is-defined-REPORT-is-defined-DUE.result +++ b/testing/tests/regression-suite/2505-is-defined-REPORT-is-defined-DUE.result @@ -2,8 +2,8 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy -ETag: "c073b3f2dd8d609971aaafee83aa4002" -Content-Length: 1321 +ETag: "50cac5fed58d0f6d00abd3453b758f25" +Content-Length: 1295 Content-Type: text/xml; charset="utf-8" @@ -43,7 +43,6 @@ CALSCALE:GREGORIAN BEGIN:VTODO UID:19920901T130000Z-123407@host.com DTSTAMP:19920901T130000Z -DTSTART:19920415T133000Z DUE:19920516T045959Z SUMMARY:Status is set to COMPLETED, empty URL, CLASS set CLASS:PUBLIC diff --git a/testing/tests/regression-suite/2507-is-defined-REPORT-is-defined-CLASS.result b/testing/tests/regression-suite/2507-is-defined-REPORT-is-defined-CLASS.result index 09318d02..4915d675 100644 --- a/testing/tests/regression-suite/2507-is-defined-REPORT-is-defined-CLASS.result +++ b/testing/tests/regression-suite/2507-is-defined-REPORT-is-defined-CLASS.result @@ -2,8 +2,8 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy -ETag: "c073b3f2dd8d609971aaafee83aa4002" -Content-Length: 1321 +ETag: "50cac5fed58d0f6d00abd3453b758f25" +Content-Length: 1295 Content-Type: text/xml; charset="utf-8" @@ -43,7 +43,6 @@ CALSCALE:GREGORIAN BEGIN:VTODO UID:19920901T130000Z-123407@host.com DTSTAMP:19920901T130000Z -DTSTART:19920415T133000Z DUE:19920516T045959Z SUMMARY:Status is set to COMPLETED, empty URL, CLASS set CLASS:PUBLIC