mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-27 05:11:41 +02:00
formatting
This commit is contained in:
parent
56c4f47c30
commit
c86025cae3
@ -252,23 +252,23 @@ class calendar_ical extends calendar_boupdate
|
|||||||
$rrule = array('FREQ' => $this->recur_egw2ical_1_0[$event['recur_type']].$interval);
|
$rrule = array('FREQ' => $this->recur_egw2ical_1_0[$event['recur_type']].$interval);
|
||||||
switch ($event['recur_type'])
|
switch ($event['recur_type'])
|
||||||
{
|
{
|
||||||
case MCAL_RECUR_WEEKLY:
|
case MCAL_RECUR_WEEKLY:
|
||||||
$days = array();
|
$days = array();
|
||||||
foreach($this->recur_days_1_0 as $id => $day)
|
foreach($this->recur_days_1_0 as $id => $day)
|
||||||
{
|
{
|
||||||
if ($event['recur_data'] & $id) $days[] = strtoupper(substr($day,0,2));
|
if ($event['recur_data'] & $id) $days[] = strtoupper(substr($day,0,2));
|
||||||
}
|
}
|
||||||
$rrule['BYDAY'] = implode(' ',$days);
|
$rrule['BYDAY'] = implode(' ',$days);
|
||||||
$rrule['FREQ'] = $rrule['FREQ'].' '.$rrule['BYDAY'];
|
$rrule['FREQ'] = $rrule['FREQ'].' '.$rrule['BYDAY'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MCAL_RECUR_MONTHLY_MDAY: // date of the month: BYMONTDAY={1..31}
|
case MCAL_RECUR_MONTHLY_MDAY: // date of the month: BYMONTDAY={1..31}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MCAL_RECUR_MONTHLY_WDAY: // weekday of the month: BDAY={1..5}{MO..SO}
|
case MCAL_RECUR_MONTHLY_WDAY: // weekday of the month: BDAY={1..5}{MO..SO}
|
||||||
$rrule['BYDAY'] = (1 + (int) ((date('d',$event['start'])-1) / 7)).'+ '.
|
$rrule['BYDAY'] = (1 + (int) ((date('d',$event['start'])-1) / 7)).'+ '.
|
||||||
strtoupper(substr(date('l',$event['start']),0,2));
|
strtoupper(substr(date('l',$event['start']),0,2));
|
||||||
$rrule['FREQ'] = $rrule['FREQ'].' '.$rrule['BYDAY'];
|
$rrule['FREQ'] = $rrule['FREQ'].' '.$rrule['BYDAY'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,22 +292,22 @@ class calendar_ical extends calendar_boupdate
|
|||||||
$rrule = array('FREQ' => $this->recur_egw2ical_2_0[$event['recur_type']]);
|
$rrule = array('FREQ' => $this->recur_egw2ical_2_0[$event['recur_type']]);
|
||||||
switch ($event['recur_type'])
|
switch ($event['recur_type'])
|
||||||
{
|
{
|
||||||
case MCAL_RECUR_WEEKLY:
|
case MCAL_RECUR_WEEKLY:
|
||||||
$days = array();
|
$days = array();
|
||||||
foreach($this->recur_days as $id => $day)
|
foreach($this->recur_days as $id => $day)
|
||||||
{
|
{
|
||||||
if ($event['recur_data'] & $id) $days[] = strtoupper(substr($day,0,2));
|
if ($event['recur_data'] & $id) $days[] = strtoupper(substr($day,0,2));
|
||||||
}
|
}
|
||||||
$rrule['BYDAY'] = implode(',',$days);
|
$rrule['BYDAY'] = implode(',',$days);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MCAL_RECUR_MONTHLY_MDAY: // date of the month: BYMONTDAY={1..31}
|
case MCAL_RECUR_MONTHLY_MDAY: // date of the month: BYMONTDAY={1..31}
|
||||||
$rrule['BYMONTHDAY'] = (int) date('d',$event['start']);
|
$rrule['BYMONTHDAY'] = (int) date('d',$event['start']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MCAL_RECUR_MONTHLY_WDAY: // weekday of the month: BDAY={1..5}{MO..SO}
|
case MCAL_RECUR_MONTHLY_WDAY: // weekday of the month: BDAY={1..5}{MO..SO}
|
||||||
$rrule['BYDAY'] = (1 + (int) ((date('d',$event['start'])-1) / 7)).
|
$rrule['BYDAY'] = (1 + (int) ((date('d',$event['start'])-1) / 7)).
|
||||||
strtoupper(substr(date('l',$event['start']),0,2));
|
strtoupper(substr(date('l',$event['start']),0,2));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ($event['recur_interval'] > 1) $rrule['INTERVAL'] = $event['recur_interval'];
|
if ($event['recur_interval'] > 1) $rrule['INTERVAL'] = $event['recur_interval'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user