Fix computation of yearly recurring events using the Horde_Date_Recurrence class (database backend)
This commit is contained in:
parent
fb5c1c40d1
commit
3b913e15d3
1 changed files with 7 additions and 1 deletions
|
@ -70,7 +70,13 @@ class calendar_recurrence
|
||||||
public function next_start()
|
public function next_start()
|
||||||
{
|
{
|
||||||
$time = false;
|
$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']) {
|
if ($this->event['allday']) {
|
||||||
$next->hour = $this->hour; # fix time for all-day events
|
$next->hour = $this->hour; # fix time for all-day events
|
||||||
$next->min = 0;
|
$next->min = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue