Merge branch 'arcpatch-D203'
This commit is contained in:
commit
1e68b24b70
3 changed files with 4 additions and 16 deletions
|
@ -612,14 +612,8 @@ class kolab_calendar extends kolab_storage_folder_api
|
|||
|
||||
// determine a reasonable end date if none given
|
||||
if (!$end) {
|
||||
switch ($event['recurrence']['FREQ']) {
|
||||
case 'YEARLY': $intvl = 'P100Y'; break;
|
||||
case 'MONTHLY': $intvl = 'P20Y'; break;
|
||||
default: $intvl = 'P10Y'; break;
|
||||
}
|
||||
|
||||
$end = clone $event['start'];
|
||||
$end->add(new DateInterval($intvl));
|
||||
$end->add(new DateInterval('P100Y'));
|
||||
}
|
||||
|
||||
// copy the recurrence rule from the master event (to be used in the UI)
|
||||
|
@ -708,7 +702,7 @@ class kolab_calendar extends kolab_storage_folder_api
|
|||
break;
|
||||
|
||||
// avoid endless recursion loops
|
||||
if (++$i > 1000)
|
||||
if (++$i > 100000)
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -130,14 +130,8 @@ class kolab_date_recurrence
|
|||
|
||||
// determine a reasonable end date if none given
|
||||
if (!$event['recurrence']['COUNT'] && $event['end'] instanceof DateTime) {
|
||||
switch ($event['recurrence']['FREQ']) {
|
||||
case 'YEARLY': $intvl = 'P100Y'; break;
|
||||
case 'MONTHLY': $intvl = 'P20Y'; break;
|
||||
default: $intvl = 'P10Y'; break;
|
||||
}
|
||||
|
||||
$end_dt = clone $event['end'];
|
||||
$end_dt->add(new DateInterval($intvl));
|
||||
$end_dt->add(new DateInterval('P100Y'));
|
||||
|
||||
return $end_dt;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ class kolab_storage_cache_event extends kolab_storage_cache
|
|||
// extend date range for recurring events
|
||||
if ($object['recurrence'] && $object['_formatobj']) {
|
||||
$recurrence = new kolab_date_recurrence($object['_formatobj']);
|
||||
$dtend = $recurrence->end() ?: new DateTime('now +10 years');
|
||||
$dtend = $recurrence->end() ?: new DateTime('now +100 years');
|
||||
$sql_data['dtend'] = $this->_convert_datetime($dtend);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue