From 5623866894c1f4c71677f4afd03456db36bb88f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Lehrke?= Date: Fri, 14 May 2010 10:17:11 +0000 Subject: [PATCH] Fix monthly recurrence issue (bug#2584) --- calendar/inc/class.calendar_ical.inc.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index 5f60c7006d..f7f29ac5c2 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -2497,9 +2497,14 @@ class calendar_ical extends calendar_boupdate elseif (preg_match('/YM(\d+) (.*)/',$recurence, $recurenceMatches)) { $vcardData['recur_interval'] = $recurenceMatches[1]; - if ($recurenceMatches[2] != '#0') + $enddate = trim($recurenceMatches[2]); + if ($enddate != '#0') { - $vcardData['recur_enddate'] = $this->vCalendar->_parseDateTime(trim($recurenceMatches[2])); + if (preg_match('/([\d,]+) (.*)/', $enddate, $fixMatches)) + { + $enddate = trim($fixMatches[2]); + } + $vcardData['recur_enddate'] = $this->vCalendar->_parseDateTime($enddate); } } else break;