plugins/calendar
Thomas Brüderli
bruederli at kolabsys.com
Wed Feb 27 10:04:25 CET 2013
plugins/calendar/lib/calendar_recurrence.php | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 3b913e15d362ffd05a9d4e09a6c352793eea1f85
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed Feb 27 10:04:05 2013 +0100
Fix computation of yearly recurring events using the Horde_Date_Recurrence class (database backend)
diff --git a/plugins/calendar/lib/calendar_recurrence.php b/plugins/calendar/lib/calendar_recurrence.php
index bf534f5..d4a3641 100644
--- a/plugins/calendar/lib/calendar_recurrence.php
+++ b/plugins/calendar/lib/calendar_recurrence.php
@@ -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;
More information about the commits
mailing list