mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
* Calendar/CalDAV: set current user as owner for events created in resource calendar
This commit is contained in:
parent
819b277c24
commit
ccd6acd606
@ -99,7 +99,7 @@ class calendar_bo
|
||||
*/
|
||||
var $customfields = array();
|
||||
/**
|
||||
* @var int $user nummerical id of the current user-id
|
||||
* @var int $user numerical id of the current user-id
|
||||
*/
|
||||
var $user=0;
|
||||
|
||||
|
@ -20,7 +20,7 @@ use EGroupware\Api\Acl;
|
||||
* Permanent error_log() calls should use $this->caldav->log($str) instead, to be send to PHP error_log()
|
||||
* and our request-log (prefixed with "### " after request and response, like exceptions).
|
||||
*
|
||||
* @ToDo: new properties on calendars and it's ressources specially from sharing:
|
||||
* @ToDo: new properties on calendars and it's resources specially from sharing:
|
||||
* - for the invite property: 5.2.2 in https://trac.calendarserver.org/browser/CalendarServer/trunk/doc/Extensions/caldav-sharing.txt
|
||||
* - https://trac.calendarserver.org/browser/CalendarServer/trunk/doc/Extensions/caldav-schedulingchanges.txt
|
||||
*/
|
||||
|
@ -1543,6 +1543,12 @@ class calendar_ical extends calendar_boupdate
|
||||
}
|
||||
}
|
||||
|
||||
// check if event was created in a non-user calendar, e.g. a resource calendar --> set current user as owner
|
||||
if (!is_numeric($event['owner']))
|
||||
{
|
||||
$event['owner'] = $this->user;
|
||||
}
|
||||
|
||||
// update alarms depending on the given event type
|
||||
if (count($event['alarm']) > 0 || isset($this->supportedFields['alarm']) && isset($event['alarm']))
|
||||
{
|
||||
@ -2813,7 +2819,7 @@ class calendar_ical extends calendar_boupdate
|
||||
{
|
||||
$event['organizer'] = $attributes['params']['CN'].' <'.$event['organizer'].'>';
|
||||
}
|
||||
// fall throught
|
||||
// fall through
|
||||
case 'ATTENDEE':
|
||||
// work around Ligthning sending @ as %40
|
||||
$attributes['value'] = str_replace('%40', '@', $attributes['value']);
|
||||
@ -3091,7 +3097,7 @@ class calendar_ical extends calendar_boupdate
|
||||
|
||||
case 'ATTACH':
|
||||
if ($attributes['params'] && !empty($attributes['params']['FMTTYPE'])) break; // handeled by managed attachment code
|
||||
// fall throught to store external attachment url
|
||||
// fall through to store external attachment url
|
||||
default: // X- attribute or other by EGroupware unsupported property
|
||||
//error_log(__METHOD__."() $attributes[name] = ".array2string($attributes));
|
||||
// for attributes with multiple values in multiple lines, merge the values
|
||||
@ -3461,4 +3467,4 @@ class calendar_ical extends calendar_boupdate
|
||||
error_log(__METHOD__."(..., $start, $end) returning ".array2string($fbdata));
|
||||
return $fbdata;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user