mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
Fix recurring event issue
This commit is contained in:
parent
e763d692c9
commit
ad79f404e9
@ -1873,22 +1873,10 @@ class calendar_boupdate extends calendar_bo
|
|||||||
$recurrence_event = false;
|
$recurrence_event = false;
|
||||||
$wasPseudo = false;
|
$wasPseudo = false;
|
||||||
|
|
||||||
if ($event['recur_type'] != MCAL_RECUR_NONE)
|
|
||||||
{
|
|
||||||
$type = 'SERIES-MASTER';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// SINGLE, SERIES-EXCEPTION OR SERIES-EXCEPTON-STATUS
|
|
||||||
if (($foundEvents = $this->find_event($event, 'exact')))
|
if (($foundEvents = $this->find_event($event, 'exact')))
|
||||||
{
|
{
|
||||||
// We found the exact match
|
// We found the exact match
|
||||||
$eventID = array_shift($foundEvents);
|
$eventID = array_shift($foundEvents);
|
||||||
if ($this->log)
|
|
||||||
{
|
|
||||||
error_log(__FILE__.'['.__LINE__.'] '.__METHOD__.
|
|
||||||
"()[EVENT]: $eventID");
|
|
||||||
}
|
|
||||||
if (strstr($eventID, ':'))
|
if (strstr($eventID, ':'))
|
||||||
{
|
{
|
||||||
$type = 'SERIES-PSEUDO-EXCEPTION';
|
$type = 'SERIES-PSEUDO-EXCEPTION';
|
||||||
@ -1903,17 +1891,24 @@ class calendar_boupdate extends calendar_bo
|
|||||||
{
|
{
|
||||||
$stored_event = $this->read($eventID, 0, false, 'server');
|
$stored_event = $this->read($eventID, 0, false, 'server');
|
||||||
}
|
}
|
||||||
if (empty($event['uid']))
|
if (!empty($stored_event['uid']) && empty($event['uid']))
|
||||||
{
|
{
|
||||||
$event['uid'] = $stored_event['uid']; // restore the UID if it was not delivered
|
$event['uid'] = $stored_event['uid']; // restore the UID if it was not delivered
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($event['recur_type'] != MCAL_RECUR_NONE)
|
||||||
|
{
|
||||||
|
$type = 'SERIES-MASTER';
|
||||||
|
}
|
||||||
|
|
||||||
if ($type == 'SINGLE' &&
|
if ($type == 'SINGLE' &&
|
||||||
($foundEvents = $this->find_event($event, 'master')))
|
($foundEvents = $this->find_event($event, 'master')))
|
||||||
{
|
{
|
||||||
// Let's try to find a related series
|
// SINGLE, SERIES-EXCEPTION OR SERIES-EXCEPTON-STATUS
|
||||||
foreach ($foundEvents as $eventID)
|
foreach ($foundEvents as $eventID)
|
||||||
{
|
{
|
||||||
|
// Let's try to find a related series
|
||||||
if ($this->log)
|
if ($this->log)
|
||||||
{
|
{
|
||||||
error_log(__FILE__.'['.__LINE__.'] '.__METHOD__.
|
error_log(__FILE__.'['.__LINE__.'] '.__METHOD__.
|
||||||
@ -2008,7 +2003,6 @@ class calendar_boupdate extends calendar_bo
|
|||||||
// unset it to prevent confusion of stored event and master event
|
// unset it to prevent confusion of stored event and master event
|
||||||
unset($event['id']);
|
unset($event['id']);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// check ACL
|
// check ACL
|
||||||
if (is_array($master_event))
|
if (is_array($master_event))
|
||||||
|
Loading…
Reference in New Issue
Block a user