Keep event owner while copying, if current user has add permissions

This commit is contained in:
nathangray 2016-07-26 11:45:48 -06:00
parent 38ee3853cf
commit 1359ce2aca

View File

@ -600,7 +600,7 @@ class calendar_uiforms extends calendar_ui
unset($event['modified']); unset($event['modified']);
unset($event['modifier']); unset($event['modifier']);
unset($event['caldav_name']); unset($event['caldav_name']);
$event['owner'] = !(int)$this->owner || !$this->bo->check_perms(Acl::ADD,0,$this->owner) ? $this->user : $this->owner; $event['owner'] = !(int)$event['owner'] || !$this->bo->check_perms(Acl::ADD,0,$evnet['owner']) ? $this->user : $event['owner'];
// Clear participant stati // Clear participant stati
foreach($event['participant_types'] as $type => &$participants) foreach($event['participant_types'] as $type => &$participants)