mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
* Calendar/CalDAV: rejected meeting-requests were not returned when searching for free time
This commit is contained in:
parent
6bb7c50642
commit
ca8a6328d5
@ -3222,6 +3222,7 @@ class calendar_ical extends calendar_boupdate
|
||||
{
|
||||
if ($event['non_blocking']) continue;
|
||||
if ($event['uid'] === $extra['X-CALENDARSERVER-MASK-UID']) continue;
|
||||
if ($event['participants'][$user] == 'R') continue;
|
||||
|
||||
$fbtype = $event['participants'][$user] == 'T' ? 'BUSY-TENTATIVE' : 'BUSY';
|
||||
|
||||
|
@ -2145,7 +2145,7 @@ class calendar_uiforms extends calendar_ui
|
||||
*/
|
||||
function freetime($participants,$start,$end,$duration=1,$cal_id=0)
|
||||
{
|
||||
if ($this->debug > 2) $this->bo->debug_message('uiforms::freetime(participants=%1, start=%2, end=%3, duration=%4, cal_id=%5)',true,$participants,$start,$end,$duration,$cal_id);
|
||||
if ($this->debug > 2) $this->bo->debug_message(__METHOD__.'(participants=%1, start=%2, end=%3, duration=%4, cal_id=%5)',true,$participants,$start,$end,$duration,$cal_id);
|
||||
|
||||
$busy = $this->bo->search(array(
|
||||
'start' => $start,
|
||||
@ -2166,6 +2166,22 @@ class calendar_uiforms extends calendar_ui
|
||||
|
||||
if ($event['non_blocking']) continue; // ignore non_blocking events
|
||||
|
||||
// check if from all wanted participants at least one has a not rejected status in found event
|
||||
$non_rejected_found = false;
|
||||
foreach($participants as $uid)
|
||||
{
|
||||
if ($event['participants'][$uid] == 'R') continue;
|
||||
|
||||
if (isset($event['participants'][$uid]) ||
|
||||
$uid > 0 && array_intersect(array_keys((array)$event['participants']),
|
||||
$GLOBALS['egw']->accounts->memberships($uid, true)))
|
||||
{
|
||||
$non_rejected_found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$non_rejected_found) continue;
|
||||
|
||||
if ($this->debug)
|
||||
{
|
||||
echo "<p>ft_start=".date('D d.m.Y H:i',$ft_start)."<br>\n";
|
||||
|
Loading…
Reference in New Issue
Block a user