forked from extern/egroupware
- some minor asthetic cleanups
- give us a fighting chance at importing daily and monthly events.
This commit is contained in:
parent
7b9ae9942e
commit
6059d6cc0f
@ -3249,18 +3249,19 @@
|
|||||||
{
|
{
|
||||||
$interval = (int)$ical['event'][$i]['rrule']['interval'];
|
$interval = (int)$ical['event'][$i]['rrule']['interval'];
|
||||||
}
|
}
|
||||||
// recur_type
|
/* recur_type */
|
||||||
switch($ical['event'][$i]['rrule']['freq'])
|
switch($ical['event'][$i]['rrule']['freq'])
|
||||||
{
|
{
|
||||||
case DAILY:
|
case DAILY:
|
||||||
$recur_type = MCAL_RECUR_DAILY;
|
$so_event->set_recur_daily($recur_enddate['year'],$recur_enddate['month'],$recur_enddate['mday'],$interval);
|
||||||
break;
|
break;
|
||||||
case WEEKLY:
|
case WEEKLY:
|
||||||
$so_event->set_recur_weekly($recur_enddate['year'],$recur_enddate['month'],$recur_enddate['mday'],$interval,$recur_data);
|
$so_event->set_recur_weekly($recur_enddate['year'],$recur_enddate['month'],$recur_enddate['mday'],$interval,$recur_data);
|
||||||
break;
|
break;
|
||||||
case MONTHLY:
|
case MONTHLY:
|
||||||
// Still need to determine if this is by day or by week for the month..
|
/* FIXME: need to handle by month by day or by week.
|
||||||
// $recur_type = MCAL_RECUR_M??????;
|
* AssUMe by month by day for now. */
|
||||||
|
$so_event->set_recur_monthly_mday($recur_enddate['year'],$recur_enddate['month'],$recur_enddate['mday'],$interval);
|
||||||
break;
|
break;
|
||||||
case YEARLY:
|
case YEARLY:
|
||||||
$so_event->set_recur_yearly($recur_enddate['year'],$recur_enddate['month'],$recur_enddate['mday'],$interval);
|
$so_event->set_recur_yearly($recur_enddate['year'],$recur_enddate['month'],$recur_enddate['mday'],$interval);
|
||||||
@ -3279,8 +3280,11 @@
|
|||||||
$so_event->add_attribute('participants','A',$GLOBALS['phpgw_info']['user']['account_id']);
|
$so_event->add_attribute('participants','A',$GLOBALS['phpgw_info']['user']['account_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if the original organizer is an egroupware user, add the original user as an event participant */
|
/* if the original organizer is an egroupware user, add the original
|
||||||
/* NB: ['mailto'] has two parts, ['user'], containing the username, and ['host'], containing the domain of the user's email address */
|
* user as an event participant.
|
||||||
|
* NB: ['mailto'] has two parts, ['user'], containing the username,
|
||||||
|
* and ['host'], containing the domain of the user's email address.
|
||||||
|
*/
|
||||||
if (isset($ical['event'][$i]['organizer']['mailto']['user']) && $GLOBALS['phpgw']->accounts->exists($ical['event'][$i]['organizer']['mailto']['user']) == True)
|
if (isset($ical['event'][$i]['organizer']['mailto']['user']) && $GLOBALS['phpgw']->accounts->exists($ical['event'][$i]['organizer']['mailto']['user']) == True)
|
||||||
{
|
{
|
||||||
$so_event->add_attribute('participants','A',(int)$GLOBALS['phpgw']->accounts->name2id($ical['event'][$i]['organizer']['mailto']['user']));
|
$so_event->add_attribute('participants','A',(int)$GLOBALS['phpgw']->accounts->name2id($ical['event'][$i]['organizer']['mailto']['user']));
|
||||||
|
Loading…
Reference in New Issue
Block a user