mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-02 20:19:27 +01:00
* CalDAV/Calendar: fix weekly recurring events without explicit weekday (BYDAY) were not using start-date
This commit is contained in:
parent
7a060b205b
commit
e0113c6026
@ -2707,7 +2707,7 @@ class calendar_ical extends calendar_boupdate
|
|||||||
break;
|
break;
|
||||||
case 'RRULE':
|
case 'RRULE':
|
||||||
unset($vcardData['recur_type']); // it wont be set by +=
|
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);
|
if (!empty($vcardData['recur_enddate'])) self::check_fix_endate ($vcardData);
|
||||||
break;
|
break;
|
||||||
case 'EXDATE': // current Horde_Icalendar returns dates, no timestamps
|
case 'EXDATE': // current Horde_Icalendar returns dates, no timestamps
|
||||||
|
@ -982,13 +982,13 @@ class calendar_rrule implements Iterator
|
|||||||
/**
|
/**
|
||||||
* Parse an iCal recurrence-rule string
|
* Parse an iCal recurrence-rule string
|
||||||
*
|
*
|
||||||
* @param type $recurence
|
* @param string $recurence
|
||||||
* @param bool $support_below_daily =false true: support FREQ=HOURLY|MINUTELY
|
* @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;
|
$vcardData['recur_interval'] = 1;
|
||||||
$matches = null;
|
$matches = null;
|
||||||
$type = preg_match('/FREQ=([^;: ]+)/i',$recurence,$matches) ? $matches[1] : $recurence[0];
|
$type = preg_match('/FREQ=([^;: ]+)/i',$recurence,$matches) ? $matches[1] : $recurence[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user