Calendar: When moving an event reset status of non-users according to event owner's preference instead of always resetting

This commit is contained in:
nathan 2023-04-19 11:00:35 -06:00
parent 5c1c31e2a5
commit da68b83a07

View File

@ -3169,28 +3169,31 @@ class calendar_boupdate extends calendar_bo
continue;
}
// Just user accounts
if(is_int($uid))
{
// Just user accounts
$preferences = new Api\Preferences($uid);
}
else
{
// For non-users, use the owner's preference
$preferences = new Api\Preferences($event['owner']);
}
$part_prefs = $preferences->read_repository();
switch($part_prefs['calendar']['reset_stati'])
{
case 'no':
break;
case 'startday':
if ($sameday) break;
if($sameday)
{
break;
}
default:
$status_reset = true;
$event['participants'][$uid] = calendar_so::combine_status('U', $q, $r);
}
}
// All other participant types
else
{
$status_reset = true;
$event['participants'][$uid] = calendar_so::combine_status('U',$q,$r);
}
}
return $status_reset;