From da35c68b9782218dd63c720199a9eeee1a95e6c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Lehrke?= Date: Wed, 3 Feb 2010 15:57:44 +0000 Subject: [PATCH] Fix occurrence count for recurring events again :-( --- calendar/inc/class.calendar_sif.inc.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_sif.inc.php b/calendar/inc/class.calendar_sif.inc.php index d59cb40400..be1d432d62 100644 --- a/calendar/inc/class.calendar_sif.inc.php +++ b/calendar/inc/class.calendar_sif.inc.php @@ -895,7 +895,7 @@ class calendar_sif extends calendar_boupdate { error_log(__FILE__.'['.__LINE__.'] '.__METHOD__. "($_id, $recur_date) Unsupported status only exception, skipped ...\n", - 3,$this->logfile); + 3, $this->logfile); } return false; // unsupported pseudo exception } @@ -936,7 +936,6 @@ class calendar_sif extends calendar_boupdate if ($day <= $event['start']) unset($exceptions[$key]); } $event['recur_exception'] = $exceptions; - calendar_rrule::rrule2tz($event, $event['start'], $tzid); } if ($this->uidExtension) @@ -990,6 +989,11 @@ class calendar_sif extends calendar_boupdate { $occurrences++; $recur_date = $rriter->current(); + if ($this->log) + { + error_log(__FILE__.'['.__LINE__.'] '.__METHOD__. + "() Client Recurrence[$occurrences] $recur_date\n", 3, $this->logfile); + } if (!$rriter->exceptions || !in_array($recur_date->format('Ymd'),$rriter->exceptions)) { $recur_end = $recur_date; @@ -1001,6 +1005,8 @@ class calendar_sif extends calendar_boupdate $sifEvent .= ''. self::getDateTime($recurEndDate,$tzid) .''; } + calendar_rrule::rrule2tz($event, $event['start'], $tzid); + $eventInterval = ($event['recur_interval'] > 1 ? $event['recur_interval'] : 1); switch ($event['recur_type'])