Fix computation of yearly recurring events using the Horde_Date_Recurrence class (database backend)

This commit is contained in:
Thomas Bruederli 2013-02-27 10:04:05 +01:00
parent fb5c1c40d1
commit 3b913e15d3

View file

@ -70,7 +70,13 @@ class calendar_recurrence
public function next_start()
{
$time = false;
if ($this->next && ($next = $this->engine->nextActiveRecurrence(array('year' => $this->next->year, 'month' => $this->next->month, 'mday' => $this->next->mday + 1, 'hour' => $this->next->hour, 'min' => $this->next->min, 'sec' => $this->next->sec)))) {
$after = clone $this->next;
$after->mday = $after->mday + 1;
if ($this->next && ($next = $this->engine->nextActiveRecurrence($after))) {
if (!$next->after($this->next)) {
// avoid endless loops if recurrence computation fails
return false;
}
if ($this->event['allday']) {
$next->hour = $this->hour; # fix time for all-day events
$next->min = 0;