mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
* Calendar/CalDAV: fix yearly recurring events stalling sync
also fixed PHP Warning about array_intersect parameter 2 not being an array
This commit is contained in:
parent
3769b14378
commit
7ab0d0b6d2
@ -797,7 +797,8 @@ class calendar_groupdav extends Api\CalDAV\Handler
|
||||
// not for included exceptions (Lightning): $master['recur_exception'][] = $recurrence['start'];
|
||||
}
|
||||
// only add master if we are not expanding and current user participates in master (and not just some exceptions)
|
||||
if (!$expand && $master && (!$user || self::isParticipant($master, $user)))
|
||||
// also need to add master, if we have no (other) $events eg. birthday noone every accepted/rejected
|
||||
if (!$expand && $master && (!$user || self::isParticipant($master, $user) || !$events))
|
||||
{
|
||||
$events = array_merge(array($master), $events);
|
||||
}
|
||||
@ -814,8 +815,9 @@ class calendar_groupdav extends Api\CalDAV\Handler
|
||||
public static function isParticipant(array $event, $user)
|
||||
{
|
||||
return isset($event['participants'][$user]) ||
|
||||
// for group-invitations we need to check memberships of $user too
|
||||
array_intersect(array_keys($event['participants']), $GLOBALS['egw']->accounts->memberships($user, true));
|
||||
// for users and group-invitations we need to check memberships of $user too
|
||||
$user > 0 && array_intersect(array_keys($event['participants']),
|
||||
(array)$GLOBALS['egw']->accounts->memberships($user, true));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user