Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Merge branch '2019.11' into 2020.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins committed Nov 16, 2020
2 parents 7ab0e9d + 030c30a commit 82dc28c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tine20/Calendar/Controller/Event.php
Expand Up @@ -238,7 +238,8 @@ public function create(Tinebase_Record_Interface $_record, $_checkBusyConflicts
// ensure that all attendee are free
$this->checkBusyConflicts($_record);
}


// skip sending notifications in parent
$sendNotifications = $this->_sendNotifications;
$this->_sendNotifications = FALSE;

Expand All @@ -256,7 +257,10 @@ public function create(Tinebase_Record_Interface $_record, $_checkBusyConflicts
$createdEvent->mute = $_record->mute;
if ($this->_sendNotifications) {
$this->doSendNotifications($createdEvent, Tinebase_Core::getUser(), 'created');
}
} else {
if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__
. ' Skip sending notifications');
}

return $createdEvent;
}
Expand Down Expand Up @@ -3091,7 +3095,7 @@ public function doSendNotifications(Tinebase_Record_Interface $_event, Tinebase_
{
if ($_event->mute) {
if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__
. ' skip sending notifications as event is muted');
. ' Skip sending notifications as event is muted');

return;
}
Expand Down
7 changes: 7 additions & 0 deletions tine20/Calendar/Frontend/WebDAV/Event.php
Expand Up @@ -154,11 +154,16 @@ public static function create(Tinebase_Model_Container $container, $name, $vobje
// or when an event gets moved to another container
if (null === ($existingEvent = Calendar_Controller_MSEventFacade::getInstance()->getExistingEventByUID(
$event->uid, $event->hasExternalOrganizer(), 'sync', null, true))) {
if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__
. ' Did not find existing event by UID - trying to find one by id (' . $event->uid . ')');
$existingEvent = Calendar_Controller_MSEventFacade::getInstance()->getExistingEventById($event->uid,
$event->hasExternalOrganizer(), 'sync', null, true);
}

if ($existingEvent === null) {
if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__
. ' Creating new event');

self::checkWriteAccess($converter);
$retry = false;
try {
Expand Down Expand Up @@ -196,6 +201,8 @@ public static function create(Tinebase_Model_Container $container, $name, $vobje

$vevent = new self($container, $event);
} else {
if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__
. ' Update existing event');

if ($existingEvent->hasExternalOrganizer() && is_numeric($existingEvent->external_seq) &&
(int)$event->external_seq < (int)$existingEvent->external_seq) {
Expand Down

0 comments on commit 82dc28c

Please sign in to comment.