Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117779162
D4457.1775245572.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D4457.1775245572.diff
View Options
diff --git a/lib/kolab_sync_data.php b/lib/kolab_sync_data.php
--- a/lib/kolab_sync_data.php
+++ b/lib/kolab_sync_data.php
@@ -490,7 +490,23 @@
*/
public function createEntry($folderId, Syncroton_Model_IEntry $entry)
{
- $entry = $this->toKolab($entry, $folderId);
+ // If we don't have an existing event (not a modification) we nevertheless check for conflicts.
+ // This is necessary so we don't overwrite the server-side copy in case the client did not have it available
+ // when generating an Add command.
+ $existing = null;
+ try {
+ $foldername = $this->getFolderName($folderId);
+ $folder = $this->getFolderObject($foldername);
+ $existing = $folder->get_object($entry->uID);
+
+ if ($existing) {
+ $this->logger->debug('Found and existing entry for UID: ' . $entry->uID);
+ }
+ } catch (Exception $e) {
+ // uID is not available on exceptions, so we guard for that and silently ignore.
+ }
+
+ $entry = $this->toKolab($entry, $folderId, $existing);
$entry = $this->createObject($folderId, $entry);
if (empty($entry)) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 7:46 PM (1 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18826125
Default Alt Text
D4457.1775245572.diff (1 KB)
Attached To
Mode
D4457: Lookup existing events even when creating a new event
Attached
Detach File
Event Timeline