mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
fix one problem if all recurrences of an event with explicit recurrences were overwritten/exceptions
This commit is contained in:
parent
66f40ee391
commit
be1224276b
@ -184,6 +184,11 @@ class DateTime extends \DateTime
|
||||
}
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return (string)$this->format(self::DATABASE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Like DateTime::add, but additional allow to use a string run through DateInterval::createFromDateString
|
||||
*
|
||||
|
@ -1417,8 +1417,11 @@ class calendar_boupdate extends calendar_bo
|
||||
$occurrence = $rrule->current();
|
||||
}
|
||||
while ($rrule->validDate($event['whole_day']) && ($enddate = $occurrence));
|
||||
$enddate->modify(($event['end'] - $event['start']).' second');
|
||||
$event['recur_enddate'] = $save_event['recur_enddate'] = $enddate->format('ts');
|
||||
if ($enddate)
|
||||
{
|
||||
$enddate->modify(($event['end'] - $event['start']).' second');
|
||||
$event['recur_enddate'] = $enddate->format('ts');
|
||||
}
|
||||
//error_log(__METHOD__."($event[title]) start=".Api\DateTime::to($event['start'],'string').', end='.Api\DateTime::to($event['end'],'string').', range_end='.Api\DateTime::to($event['recur_enddate'],'string'));
|
||||
}
|
||||
|
||||
|
@ -597,9 +597,12 @@ class calendar_rrule implements Iterator
|
||||
{
|
||||
if ($this->type == self::PERIOD)
|
||||
{
|
||||
reset($this->period);
|
||||
$this->current = clone reset($this->period);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->current = clone $this->time;
|
||||
}
|
||||
$this->current = clone $this->time;
|
||||
while ($this->valid() &&
|
||||
$this->exceptions &&
|
||||
in_array($this->current->format('Ymd'),$this->exceptions))
|
||||
|
Loading…
Reference in New Issue
Block a user