Skip to content

Commit

Permalink
Merge to 2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Mar 7, 2014
2 parents 1db8574 + 41fe919 commit 072f5f5
Show file tree
Hide file tree
Showing 34 changed files with 540 additions and 170 deletions.
2 changes: 1 addition & 1 deletion ActiveSync/NSDate+ActiveSync.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ @implementation NSDate (ActiveSync)

- (NSString *) activeSyncRepresentationInContext: (WOContext *) context
{
return [self descriptionWithCalendarFormat: @"%Y-%m-%d-T%H:%M:%S.%FZ" timeZone: [NSTimeZone timeZoneWithName: @"GMT"] locale: nil];
return [self descriptionWithCalendarFormat: @"%Y-%m-%dT%H:%M:%S.%FZ" timeZone: [NSTimeZone timeZoneWithName: @"GMT"] locale: nil];
}


Expand Down
75 changes: 50 additions & 25 deletions ActiveSync/SOGoActiveSyncDispatcher+Sync.m
Original file line number Diff line number Diff line change
Expand Up @@ -571,24 +571,27 @@ - (void) processSyncGetChanges: (id <DOMElement>) theDocumentElement
case ActiveSyncMailFolder:
default:
{
NSMutableArray *addedOrChangedMessages;
SOGoMailObject *mailObject;
NSString *uid, *command;
NSDictionary *aMessage;
NSArray *allMessages;

int deleted_count;

allMessages = [theCollection syncTokenFieldsWithProperties: nil matchingSyncToken: theSyncKey fromDate: theFilterType];

addedOrChangedMessages = [NSMutableArray array];
deleted_count = 0;

// Check for the WindowSize.
// FIXME: we should eventually check for modseq and slice the maximum
// amount of messages returned to ensure we don't have the same
// modseq accross contiguous boundaries
max = [allMessages count];
if (max > theWindowSize)
{
max = theWindowSize;
more_available = YES;
}

// We first check the number of deleted messages we have
// We do NOT honor the window size here as it seems to be
// impossible to get the modseq of an expunged message so
// we can't iterate in the list of deleted messages.
for (i = 0; i < max; i++)
{
aMessage = [allMessages objectAtIndex: i];
Expand All @@ -601,31 +604,53 @@ - (void) processSyncGetChanges: (id <DOMElement>) theDocumentElement
[s appendString: @"<Delete xmlns=\"AirSync:\">"];
[s appendFormat: @"<ServerId xmlns=\"AirSync:\">%@</ServerId>", uid];
[s appendString: @"</Delete>"];
deleted_count++;
}
else
{
if ([command isEqualToString: @"added"])
[s appendString: @"<Add xmlns=\"AirSync:\">"];
else
[s appendString: @"<Change xmlns=\"AirSync:\">"];
[addedOrChangedMessages addObject: aMessage];
}
}

mailObject = [theCollection lookupName: uid
// We then "pad" with our added/changed messages. We ALWAYS
// at least return one if available
max = [addedOrChangedMessages count];

for (i = 0; i < max; i++)
{
aMessage = [addedOrChangedMessages objectAtIndex: i];

uid = [[[aMessage allKeys] lastObject] stringValue];
command = [[aMessage allValues] lastObject];

if ([command isEqualToString: @"added"])
[s appendString: @"<Add xmlns=\"AirSync:\">"];
else
[s appendString: @"<Change xmlns=\"AirSync:\">"];

mailObject = [theCollection lookupName: uid
inContext: context
acquire: 0];

[s appendFormat: @"<ServerId xmlns=\"AirSync:\">%@</ServerId>", uid];
[s appendString: @"<ApplicationData xmlns=\"AirSync:\">"];
[s appendString: [mailObject activeSyncRepresentationInContext: context]];
[s appendString: @"</ApplicationData>"];

if ([command isEqualToString: @"added"])
[s appendString: @"</Add>"];
else
[s appendString: @"</Change>"];

acquire: 0];

[s appendFormat: @"<ServerId xmlns=\"AirSync:\">%@</ServerId>", uid];
[s appendString: @"<ApplicationData xmlns=\"AirSync:\">"];
[s appendString: [mailObject activeSyncRepresentationInContext: context]];
[s appendString: @"</ApplicationData>"];

if ([command isEqualToString: @"added"])
[s appendString: @"</Add>"];
else
[s appendString: @"</Change>"];


// We check if we must stop padding
if (i+1+deleted_count > theWindowSize)
{
more_available = YES;
break;
}
}

//
if (more_available)
{
Expand Down
7 changes: 4 additions & 3 deletions ActiveSync/SOGoMailObject+ActiveSync.m
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ - (NSString *) _uidFromGlobalObjectId: (NSData *) objectId
- (NSString *) _emailAddressesFrom: (NSArray *) enveloppeAddresses
{
NGImap4EnvelopeAddress *address;
NSString *email, *rc, *name;
NSMutableArray *addresses;
NSString *email, *rc;
int i, max;

rc = nil;
Expand All @@ -179,7 +179,8 @@ - (NSString *) _emailAddressesFrom: (NSArray *) enveloppeAddresses
for (i = 0; i < max; i++)
{
address = [enveloppeAddresses objectAtIndex: i];
email = [NSString stringWithFormat: @"\"%@\" <%@>", [address personalName], [address baseEMail]];
name = [address personalName];
email = [NSString stringWithFormat: @"\"%@\" <%@>", (name ? name : [address baseEMail]), [address baseEMail]];

if (email)
[addresses addObject: email];
Expand Down Expand Up @@ -377,7 +378,7 @@ - (NSString *) activeSyncRepresentationInContext: (WOContext *) _context
// DateReceived
value = [self date];
if (value)
[s appendFormat: @"<DateReceived xmlns=\"Email:\">%@</DateReceived>", [value activeSyncRepresentationWithoutSeparatorsInContext: context]];
[s appendFormat: @"<DateReceived xmlns=\"Email:\">%@</DateReceived>", [value activeSyncRepresentationInContext: context]];

// DisplayTo
[s appendFormat: @"<DisplayTo xmlns=\"Email:\">%@</DisplayTo>", [[context activeUser] login]];
Expand Down
190 changes: 190 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,193 @@
commit 23789b48bcdcbac738039d214a92cd0bb5aff9e4
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Fri Mar 7 13:59:51 2014 -0500

Update Dutch translation

M NEWS
M UI/MailPartViewers/Dutch.lproj/Localizable.strings
M UI/PreferencesUI/Dutch.lproj/Localizable.strings
M UI/Scheduler/Dutch.lproj/Localizable.strings

commit 142296f71e0e22eae76572e7ff23a3b00a2c076f
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Fri Mar 7 10:53:17 2014 -0500

Preparation for release 2.2.1

M Documentation/SOGo Installation Guide.odt
M Documentation/SOGo Mobile Devices Configuration.odt
M Documentation/SOGo Mozilla Thunderbird Configuration.odt
M Documentation/SOGo Native Microsoft Outlook Configuration.odt
M NEWS
M Version

commit 3bae2387d4e0efcfe88fd56fa743c70deb638ee8
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Thu Mar 6 22:13:17 2014 -0500

Fix contact autocompletion when UID is a digit

M NEWS
M UI/WebServerResources/SOGoAutoCompletion.js
M UI/WebServerResources/generic.css

commit 6cecca6c4f0ffb6edea41f3ade3b7f90f92cdf81
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Thu Mar 6 21:32:36 2014 -0500

Fix CSS id for string prefixed with a digit

When encoding a string as a CSS identifier, we must add an underscore if
the strings starts with a digit.

M NEWS
M SoObjects/Mailer/SOGoMailAccounts.m
M SoObjects/SOGo/NSString+Utilities.m
M UI/WebServerResources/JavascriptAPIExtensions.js

commit 28b1938bd972462be383ef612e38a93870ccff1b
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Thu Mar 6 21:25:48 2014 -0500

Show folder name in dialog when renaming folder

M NEWS
M UI/WebServerResources/MailerUI.js
M UI/WebServerResources/generic.js

commit 31ace947cbf1fbbfa93a92ed0f028e5a56b8b0d1
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
Date: Thu Mar 6 14:16:08 2014 -0500

Fixed race condition when syncing huge amount of deleted messages using AS

M ActiveSync/SOGoActiveSyncDispatcher+Sync.m
M NEWS
M SoObjects/Mailer/SOGoMailFolder.m

commit 0cea36df2eebdcda55098fa0ae9416976a39a332
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
Date: Thu Mar 6 14:10:47 2014 -0500

Updated NEWS regarding previous commit

M NEWS

commit afd745232331267499592e18e5d0b857454d3cbd
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
Date: Thu Mar 6 14:05:59 2014 -0500

Fixed returned date format and fixing missing 'name part' in address

M ActiveSync/SOGoMailObject+ActiveSync.m

commit e4a21bcef5afb1245023d5561c0d60c183bfe623
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Thu Mar 6 09:27:43 2014 -0500

Webmail: fix encoding of subfolder name

Fixes #2637

M NEWS
M SoObjects/Mailer/SOGoMailFolder.m
M UI/MailerUI/UIxMailFolderActions.m

commit 0c99323db3e5404301c249512b736d426bd41d09
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Wed Mar 5 13:42:38 2014 -0500

Fix possible exception when retrieving reminder

Fixes #2624

M NEWS
M UI/PreferencesUI/UIxPreferences.m

commit da208d5b4acd18aff399261cafc9d105c8f56e55
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
Date: Wed Mar 5 09:09:33 2014 -0500

Updated NEWS regarding previous commit

M NEWS

commit 158af711528027cd63a3c70708fab96eee41dd19
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
Date: Wed Mar 5 09:07:39 2014 -0500

Fix for bug #2609

M ActiveSync/NSDate+ActiveSync.m

commit 163bce39b5ab7afc060a5af9dfd7dafa632f7b61
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Tue Mar 4 22:03:28 2014 -0500

Fix list sorting of events by calendar name

Fixes #2629

M NEWS
M UI/Templates/SchedulerUI/UIxCalMainView.wox

commit 02c72fee6ad0bf8850de88ab65a01191ff351ecc
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Tue Mar 4 21:32:57 2014 -0500

Fix unsubscription when renaming an IMAP folder

Fixes #2630

M NEWS
M SoObjects/Mailer/SOGoMailFolder.m

commit 8bef84bded384cde99dd2ee7ebfe9ebbeeedf2e6
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Tue Mar 4 09:22:00 2014 -0500

Update translations

M NEWS
M UI/PreferencesUI/Czech.lproj/Localizable.strings
M UI/PreferencesUI/Finnish.lproj/Localizable.strings
M UI/PreferencesUI/Hungarian.lproj/Localizable.strings

commit 8db3b22eb9bde326d3892c88b5c1cb9bb0251170
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Mon Mar 3 22:08:29 2014 -0500

Bump version to 2.2.0a

M Version

commit 1aabcf04b5d26471a62f97566bb3fd6911848f48
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Mon Mar 3 22:07:24 2014 -0500

Fix sogo-tool operations on Sieve script

Fixes #2617

M NEWS
M SoObjects/Mailer/SOGoMailAccount.h
M SoObjects/Mailer/SOGoMailAccount.m
M SoObjects/SOGo/SOGoSieveManager.h
M SoObjects/SOGo/SOGoSieveManager.m
M Tools/GNUmakefile.preamble
M Tools/SOGoToolExpireAutoReply.m
M Tools/SOGoToolUserPreferences.m

commit c6b227160c70db0fb892c2df1f5bb64caae45fc9
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Mon Feb 24 16:53:46 2014 -0500

Update ChangeLog

M ChangeLog
M NEWS

commit 5f2920db9b1c7fd89af8019d8a007bfddb20a742
Author: Francis Lachapelle <flachapelle@inverse.ca>
Date: Mon Feb 24 16:47:41 2014 -0500
Expand Down
Binary file modified Documentation/SOGo Installation Guide.odt
Binary file not shown.
Binary file modified Documentation/SOGo Mobile Devices Configuration.odt
Binary file not shown.
Binary file modified Documentation/SOGo Mozilla Thunderbird Configuration.odt
Binary file not shown.
Binary file modified Documentation/SOGo Native Microsoft Outlook Configuration.odt
Binary file not shown.
21 changes: 21 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
2.2.1 (2014-03-07)
------------------

Enhancements
- updated Czech, Dutch, Finnish, and Hungarian translations
- show current folder name in prompt dialog when renaming a mail folder

Bug fixes
- fixed an issue with ActiveSync when the number of messages in the mailbox was greater than the window-size specified by the client
- fixed sogo-tool operations on Sieve script (#2617)
- fixed unsubscription when renaming an IMAP folder (#2630)
- fixed sorting of events list by calendar name (#2629)
- fixed wrong date format leading to Android email syncing issues (#2609)
- fixed possible exception when retrieving the default event reminder value (#2624)
- fixed encoding of mail folder name when creating a subfolder (#2637)
- fixed returned date format for email messages in Active Sync
- fixed missing 'name part' in address for email messages in Active Sync
- fixed race condition when syncing huge amount of deleted messages over Active Sync
- fixed encoding of string as CSS identifier when the string starts with a digit
- fixed auto-completion popupmenu when UID is a digit

2.2.0 (2014-02-24)
------------------

Expand Down
4 changes: 3 additions & 1 deletion SoObjects/Mailer/SOGoMailAccount.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2009-2013 Inverse inc.
Copyright (C) 2009-2014 Inverse inc.
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of SOGo.
Expand Down Expand Up @@ -71,6 +71,8 @@ typedef enum {

- (id) getInboxQuota;
- (BOOL) updateFilters;
- (BOOL) updateFiltersWithUsername: (NSString *) theUsername
andPassword: (NSString *) thePassword;

- (NSArray *) identities;
- (NSString *) signature;
Expand Down
Loading

0 comments on commit 072f5f5

Please sign in to comment.