mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-18 11:58:24 +01:00
* Fix RRULE parser (2nd part) - Bug#2991@egroupware.org
This commit is contained in:
parent
42e0b10797
commit
6b084b40f9
@ -2506,14 +2506,11 @@ class calendar_ical extends calendar_boupdate
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif (preg_match('/MD(\d+) (.*)/',$recurence, $recurenceMatches))
|
elseif (preg_match('/MD(\d+)(?: [^ ]+)? ([0-9T]+)/',$recurence, $recurenceMatches))
|
||||||
{
|
{
|
||||||
$vcardData['recur_type'] = MCAL_RECUR_MONTHLY_MDAY;
|
$vcardData['recur_type'] = MCAL_RECUR_MONTHLY_MDAY;
|
||||||
if ($recurenceMatches[1] > 1)
|
$vcardData['recur_interval'] = $recurenceMatches[1];
|
||||||
{
|
$vcardData['recur_enddate'] = $this->vCalendar->_parseDateTime($recurenceMatches[2]);
|
||||||
$vcardData['recur_interval'] = $recurenceMatches[1];
|
|
||||||
}
|
|
||||||
$vcardData['recur_enddate'] = $this->vCalendar->_parseDateTime(trim($recurenceMatches[2]));
|
|
||||||
}
|
}
|
||||||
elseif (preg_match('/MP(\d+) (.*) (.*) (.*)/',$recurence, $recurenceMatches))
|
elseif (preg_match('/MP(\d+) (.*) (.*) (.*)/',$recurence, $recurenceMatches))
|
||||||
{
|
{
|
||||||
@ -2555,7 +2552,7 @@ class calendar_ical extends calendar_boupdate
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Y': // 1.0
|
case 'Y': // 1.0
|
||||||
if (preg_match('/YM(\d+)[^#]*#(\d+)/', $recurence, $recurenceMatches))
|
if (preg_match('/YM(\d+)(?: [^ ]+)? #(\d+)/', $recurence, $recurenceMatches))
|
||||||
{
|
{
|
||||||
$vcardData['recur_interval'] = $recurenceMatches[1];
|
$vcardData['recur_interval'] = $recurenceMatches[1];
|
||||||
if ($recurenceMatches[2] > 0 && $vcardData['end'])
|
if ($recurenceMatches[2] > 0 && $vcardData['end'])
|
||||||
@ -2570,18 +2567,10 @@ class calendar_ical extends calendar_boupdate
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif (preg_match('/YM(\d+) (.*)/',$recurence, $recurenceMatches))
|
elseif (preg_match('/YM(\d+)(?: [^ ]+)? ([0-9T]+)/',$recurence, $recurenceMatches))
|
||||||
{
|
{
|
||||||
$vcardData['recur_interval'] = $recurenceMatches[1];
|
$vcardData['recur_interval'] = $recurenceMatches[1];
|
||||||
$enddate = trim($recurenceMatches[2]);
|
$vcardData['recur_enddate'] = $this->vCalendar->_parseDateTime($recurenceMatches[2]);
|
||||||
if ($enddate != '#0')
|
|
||||||
{
|
|
||||||
if (preg_match('/([\d,]+) (.*)/', $enddate, $fixMatches))
|
|
||||||
{
|
|
||||||
$enddate = trim($fixMatches[2]);
|
|
||||||
}
|
|
||||||
$vcardData['recur_enddate'] = $this->vCalendar->_parseDateTime($enddate);
|
|
||||||
}
|
|
||||||
} else break;
|
} else break;
|
||||||
|
|
||||||
// fall-through
|
// fall-through
|
||||||
|
Loading…
Reference in New Issue
Block a user