diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index ee806f5f19..5cf1722ee8 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -2707,7 +2707,7 @@ class calendar_ical extends calendar_boupdate break; case 'RRULE': unset($vcardData['recur_type']); // it wont be set by += - $vcardData += calendar_rrule::parseRrule($attributes['value']); + $vcardData += calendar_rrule::parseRrule($attributes['value'], false, $vcardData); if (!empty($vcardData['recur_enddate'])) self::check_fix_endate ($vcardData); break; case 'EXDATE': // current Horde_Icalendar returns dates, no timestamps diff --git a/calendar/inc/class.calendar_rrule.inc.php b/calendar/inc/class.calendar_rrule.inc.php index e8504248a0..d14055a015 100644 --- a/calendar/inc/class.calendar_rrule.inc.php +++ b/calendar/inc/class.calendar_rrule.inc.php @@ -982,13 +982,13 @@ class calendar_rrule implements Iterator /** * Parse an iCal recurrence-rule string * - * @param type $recurence + * @param string $recurence * @param bool $support_below_daily =false true: support FREQ=HOURLY|MINUTELY - * @return type + * @param array $vcardData =[] already parsed values, specially value for "start" is used if no explicit BYDAY attribute + * @return array */ - public static function parseRrule($recurence, $support_below_daily=false) + public static function parseRrule($recurence, $support_below_daily=false, array $vcardData=[]) { - $vcardData = array(); $vcardData['recur_interval'] = 1; $matches = null; $type = preg_match('/FREQ=([^;: ]+)/i',$recurence,$matches) ? $matches[1] : $recurence[0];