mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Calendar: If an event went from recurring to non-recurring, recurring events could still be displayed
This commit is contained in:
parent
38a82962b0
commit
b129a46e3c
@ -691,8 +691,8 @@ class calendar_ui
|
|||||||
$this->to_client($event);
|
$this->to_client($event);
|
||||||
$response->generic('data', array('uid' => 'calendar::' . $event['row_id'], 'data' => $event));
|
$response->generic('data', array('uid' => 'calendar::' . $event['row_id'], 'data' => $event));
|
||||||
}
|
}
|
||||||
// If it's recurring, try to send the next month or so
|
// If it is (or was) recurring, try to send the next month or so
|
||||||
else if($event['recur_type'] )
|
if($event['recur_type'] || (!$event['recur_type'] && $old_event['recur_type']))
|
||||||
{
|
{
|
||||||
$this_month = new Api\DateTime('next month');
|
$this_month = new Api\DateTime('next month');
|
||||||
$data = [];
|
$data = [];
|
||||||
@ -710,6 +710,8 @@ class calendar_ui
|
|||||||
}
|
}
|
||||||
while($old_rrule->valid() && $occurrence <= $this_month);
|
while($old_rrule->valid() && $occurrence <= $this_month);
|
||||||
}
|
}
|
||||||
|
if($event['recur_type'])
|
||||||
|
{
|
||||||
$rrule = calendar_rrule::event2rrule($event, true);
|
$rrule = calendar_rrule::event2rrule($event, true);
|
||||||
$rrule->rewind();
|
$rrule->rewind();
|
||||||
do
|
do
|
||||||
@ -721,6 +723,7 @@ class calendar_ui
|
|||||||
$rrule->next();
|
$rrule->next();
|
||||||
}
|
}
|
||||||
while($rrule->valid() && $occurrence <= $this_month);
|
while($rrule->valid() && $occurrence <= $this_month);
|
||||||
|
}
|
||||||
|
|
||||||
// Now we have to go through and send each one individually, since client side data can't handle more than one
|
// Now we have to go through and send each one individually, since client side data can't handle more than one
|
||||||
foreach($data as $uid => $cal_data)
|
foreach($data as $uid => $cal_data)
|
||||||
|
Loading…
Reference in New Issue
Block a user