mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-07-06 09:31:43 +00:00
[Incomplete] Add overridden components into event expansion.
We need to make sure this only inserts overrides that are within the expansion period, or which override events within the expansion period, but this quick hack is better than not doing it at all!
This commit is contained in:
parent
05badd4d3a
commit
a6c23f3e1a
@ -1106,9 +1106,18 @@ function expand_event_instances( $vResource, $range_start = null, $range_end = n
|
||||
$component->AddProperty('DURATION', $duration );
|
||||
if ( $has_repeats && $dtstart->FloatOrUTC($return_floating_times) != $utc )
|
||||
$component->AddProperty('RECURRENCE-ID', $utc, ($is_date ? array('VALUE' => 'DATE') : null) );
|
||||
$new_components[] = $component;
|
||||
$new_components[$utc] = $component;
|
||||
}
|
||||
|
||||
// Add overriden instances
|
||||
foreach( $components AS $k => $comp ) {
|
||||
$p = $comp->GetProperty('RECURRENCE-ID');
|
||||
if (isset($p) && $p->Value() != '') {
|
||||
$new_components[$p->Value()] = $comp;
|
||||
if ( DEBUG_RRULE ) printf( "Replacing overridden instance at %s\n", $p->Value());
|
||||
}
|
||||
}
|
||||
|
||||
$vResource->SetComponents($new_components);
|
||||
|
||||
return $vResource;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user