Projects
Kolab:16:Enterprise
kolab-syncroton
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 65
View file
kolab-syncroton.spec
Changed
@@ -37,7 +37,7 @@ %global upstream_version 2.4.2 Name: kolab-syncroton -Version: 2.4.2.18 +Version: 2.4.2.21 Release: 1%{?dist} Summary: ActiveSync for Kolab Groupware
View file
debian.changelog
Changed
@@ -1,4 +1,4 @@ -kolab-syncroton (2.4.2.18-0~kolab1) unstable; urgency=low +kolab-syncroton (2.4.2.21-0~kolab1) unstable; urgency=low * Release version 2.4.2
View file
kolab-syncroton-2.4.2.tar.gz/lib/ext/Syncroton/Command/Sync.php
Changed
@@ -599,7 +599,26 @@ } } + // Handle Calendar folders first. + // Outlook can't match MeetingRequest with an event that wasn't synced yet, which + // leads to duplicated events in Outlook's calendar. + uasort( + $this->_collections, + function ($a, $b) { + $ac = $a->folder && $a->folder->class == Syncroton_Data_Factory::CLASS_CALENDAR; + $bc = $b->folder && $b->folder->class == Syncroton_Data_Factory::CLASS_CALENDAR; + if ($ac) { + return $bc ? 0 : -1; + } + return $bc ? 1 : 0; + } + ); + foreach ($this->_collections as $collectionData) { + if ($this->_logger instanceof Zend_Log) { + $this->_logger->debug(__METHOD__ . '::' . __LINE__ . " Processing {$collectionData->collectionId}..."); + } + $collectionChanges = 0; /** @@ -911,6 +930,8 @@ $applicationData = $change->appendChild($this->_outputDom->createElementNS('uri:AirSync', 'ApplicationData')); + $collectionData->options'_changesOnly' = true; + $dataController ->getEntry($collectionData, $serverId) ->appendXML($applicationData, $this->_device);
View file
kolab-syncroton-2.4.2.tar.gz/lib/ext/Syncroton/Model/AXMLEntry.php
Changed
@@ -223,6 +223,31 @@ } /** + * Fix date-time string input + * + * @param string $date Date time string + * + * @return string + */ + protected function _fixDateTimeString($date) + { + // Note: Some clients send date-time in local charset instead of ascii + // It is not supported by PHP DateTime constructor + + $from = + '١','٢','٣','٤','٥','٦','٧','٨','٩','٠', // arabic + '۱','۲','۳','۴','۵','۶','۷','۸','۹','۰', // persian + ; + + $to = + '1','2','3','4','5','6','7','8','9','0', + '1','2','3','4','5','6','7','8','9','0', + ; + + return str_replace($from, $to, $date); + } + + /** * * @param string $element * @throws InvalidArgumentException @@ -284,7 +309,7 @@ break; case 'datetime': - $property = new DateTime((string) $xmlElement, new DateTimeZone('UTC')); + $property = new DateTime($this->_fixDateTimeString((string) $xmlElement), new DateTimeZone('UTC')); break; case 'number':
View file
kolab-syncroton-2.4.2.tar.gz/lib/kolab_sync_data_email.php
Changed
@@ -250,6 +250,14 @@ } } + // Categories (Tags) + $result'categories' = $headers->others'categories' ?? ; + + //The body never changes, so make sure we don't re-send it to the client on a change + if ($collection->options'_changesOnly' ?? false) { + return new Syncroton_Model_Email($result); + } + // get truncation and body type $airSyncBaseType = Syncroton_Command_Sync::BODY_TYPE_PLAIN_TEXT; $truncateAt = null; @@ -499,9 +507,6 @@ } } - // Categories (Tags) - $result'categories' = $message->headers->others'categories' ?? ; - $is_ios = preg_match('/(iphone|ipad)/i', $this->device->devicetype); // attachments
View file
kolab-syncroton-2.4.2.tar.gz/lib/kolab_sync_storage_kolab4.php
Changed
@@ -355,7 +355,7 @@ 'serverId' => "DAV:{$type}:{$folder->id}", 'parentId' => 0, // TODO: Folder hierarchy 'displayName' => $folder->get_name(), - 'type' => $this->type_kolab2activesync($type), + 'type' => $this->type_kolab2activesync($folder->default ? "$type.default" : $type), ; }
View file
kolab-syncroton-2.4.2.tar.gz/tests/Sync/FoldersTest.php
Changed
@@ -76,15 +76,15 @@ if ($this->isStorageDriver('kolab4')) { $folders = - 'Calendar', Syncroton_Command_FolderSync::FOLDERTYPE_CALENDAR_USER_CREATED, + 'Calendar', Syncroton_Command_FolderSync::FOLDERTYPE_CALENDAR, // Note: Kolab 4 with Cyrus DAV uses Addressbook, but Kolab 3 with iRony would use 'Contacts' - '/^(Contacts|Addressbook)$/', Syncroton_Command_FolderSync::FOLDERTYPE_CONTACT_USER_CREATED, + '/^(Contacts|Addressbook)$/', Syncroton_Command_FolderSync::FOLDERTYPE_CONTACT, 'INBOX', Syncroton_Command_FolderSync::FOLDERTYPE_INBOX, 'Drafts', Syncroton_Command_FolderSync::FOLDERTYPE_DRAFTS, 'Sent', Syncroton_Command_FolderSync::FOLDERTYPE_SENTMAIL, 'Trash', Syncroton_Command_FolderSync::FOLDERTYPE_DELETEDITEMS, // Note: For now Kolab 4 uses the same Calendar folder for calendar and tasks - '/^(Tasks|Calendar)$/', Syncroton_Command_FolderSync::FOLDERTYPE_TASK_USER_CREATED, + '/^(Tasks|Calendar)$/', Syncroton_Command_FolderSync::FOLDERTYPE_TASK, ; }
View file
kolab-syncroton-2.4.2.tar.gz/tests/Sync/Sync/EmailTest.php
Changed
@@ -153,6 +153,7 @@ $root .= "/ns:Commands/ns:Add"; $this->assertStringMatchesFormat("{$folderId}::%d", $xpath->query("{$root}/ns:ServerId")->item(0)->nodeValue); $this->assertSame('sync test with attachment', $xpath->query("{$root}/ns:ApplicationData/Email:Subject")->item(0)->nodeValue); + $this->assertSame(1, $xpath->query("{$root}/ns:ApplicationData/AirSyncBase:Body")->count()); return $syncKey; } @@ -245,7 +246,11 @@ $this->assertSame($folderId, $xpath->query("{$root}/ns:CollectionId")->item(0)->nodeValue); $this->assertSame(0, $xpath->query("{$root}/ns:Commands/ns:Add")->count()); $this->assertSame(2, $xpath->query("{$root}/ns:Commands/ns:Change")->count()); + $this->assertSame(2, $xpath->query("{$root}/ns:Commands/ns:Change/ns:ApplicationData/Email:Read")->count()); + $this->assertSame('0', $xpath->query("{$root}/ns:Commands/ns:Change/ns:ApplicationData/Email:Read")->item(0)->nodeValue); + $this->assertSame('0', $xpath->query("{$root}/ns:Commands/ns:Change/ns:ApplicationData/Email:Read")->item(1)->nodeValue); + $this->assertSame(0, $xpath->query("{$root}/ns:Commands/ns:Change/ns:ApplicationData/AirSyncBase:Body")->count()); return $syncKey; }
View file
kolab-syncroton-2.4.2.tar.gz/tests/SyncTestCase.php
Changed
@@ -379,6 +379,7 @@ $xpath = new \DOMXpath($dom); $xpath->registerNamespace("ns", $dom->documentElement->namespaceURI); $xpath->registerNamespace("AirSync", "uri:AirSync"); + $xpath->registerNamespace("AirSyncBase", "uri:AirSyncBase"); $xpath->registerNamespace("Calendar", "uri:Calendar"); $xpath->registerNamespace("Contacts", "uri:Contacts"); $xpath->registerNamespace("Email", "uri:Email");
View file
kolab-syncroton.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-syncroton Binary: kolab-syncroton Architecture: all -Version: 1:2.4.2.18-1~kolab1 +Version: 1:2.4.2.21-1~kolab1 Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Uploaders: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Homepage: http://www.kolab.org/
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.