forked from extern/egroupware
* CalDAV/Calendar: fix weekly recurring events without explicit weekday (BYDAY) were not using start-date
This commit is contained in:
parent
c742d0bafc
commit
18c550b692
@ -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
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user