mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-29 08:56:03 +00:00
DTSTART on VTODO is optional, don't force it to be set.
If we force setting DTSTART, then you can't use prop-filter to find VTODOs
with a DUE set and DTSTART unset. And, well, why should DTSTART be set to DUE?
This was introduced in 18150d702d .
This commit is contained in:
1 parent
badeca53c7
commit
5a73991496
6 files changed
+21
-31
No files matched your search
+13
-18
@@ -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 = <<<EOSQL
|
||||
|
||||
Reference in new issue
Block a user