diff --git a/calendar/inc/class.calendar_bo.inc.php b/calendar/inc/class.calendar_bo.inc.php index c5337fe81b..08d2a8b616 100644 --- a/calendar/inc/class.calendar_bo.inc.php +++ b/calendar/inc/class.calendar_bo.inc.php @@ -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; diff --git a/calendar/inc/class.calendar_groupdav.inc.php b/calendar/inc/class.calendar_groupdav.inc.php index a0d08d6bee..cd2c92ec78 100644 --- a/calendar/inc/class.calendar_groupdav.inc.php +++ b/calendar/inc/class.calendar_groupdav.inc.php @@ -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 */ diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index cdf64b182c..f1db4ab0c2 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -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; } -} +} \ No newline at end of file