diff --git a/ChangeLog b/ChangeLog index 8739a012d..61810aa38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2010-11-08 Ludovic Marcotte + + * SOPE/GDLContentStore/GCSAlarmsFolder.m + We now check for non-nil values before calling + -timeInterval... + * SoObjects/Mailer/SOGoMailAccount.m + We try to fallback to the imap server prior falling + back to localhost + +2010-11-08 Francis Lachapelle + + * UI/WebServerResources/SOGoDragHandles.js (adjust): for vertical + drag handles, prioritize the top limit rather than the bottom one. + + * UI/WebServerResources/UIxContactEditor.js (onComboButtonClick): + return false so the form is not submitted when the button is clicked. + + * UI/WebServerResources/ContactsUI.js + (onCategoriesMenuPrepareVisibility): don't verify the selection if + the list doesn't exist (happens in the contact editor). + 2010-11-05 Wolfgang Sourdeau * OpenChange/MAPIStoreSOGo.m: added debugging witnesses call to @@ -27,6 +48,33 @@ (-getBody): invoked setupValues if values is nil to ensure that the timezone has been set properly. +2010-11-05 Francis Lachapelle + + * UI/MailerUI/UIxMailListActions.m (-getSortedUIDsAction): now + accepts the form parameter "no_headers" so only the UIDs are + returned, without the prefetched headers. + + * UI/WebServerResources/SOGoMailDataSource.js (init): made the + headers argument optional. + (_loadCallback): handled the case when the server doesn't send the + prefetched headers. + + * UI/WebServerResources/SOGoDataTable.js (_refresh): new method to + force the refresh of the data table with the data of the data source. + (remove): don't update the internal variables (index and count) if + the UID was not found in the data source. + + * UI/WebServerResources/MailerUI.js (openMailbox): when reloading + a mailbox, only fetch the messages UIDs (without the headers). + (loadMessageCallback): only reload the headers if the seen state + has changed. + +2010-11-04 Ludovic Marcotte + + SoObjects/SOGo/SOGoMailer.m + We stop when we see an invalid recipient and we inform the + client back with what are the invalid recipients + 2010-11-04 Wolfgang Sourdeau * Tools/SOGoSockDOperation.m (_getFolderWithId:forUser:): invoke diff --git a/SOPE/GDLContentStore/GCSAlarmsFolder.m b/SOPE/GDLContentStore/GCSAlarmsFolder.m index 69c358840..be86a18b2 100644 --- a/SOPE/GDLContentStore/GCSAlarmsFolder.m +++ b/SOPE/GDLContentStore/GCSAlarmsFolder.m @@ -326,8 +326,10 @@ static NSString *alarmsFolderURLString = nil; { NSNumber *tRecId, *tADate; - tRecId = [NSNumber numberWithInt: (int) [recId timeIntervalSince1970]]; - tADate = [NSNumber numberWithInt: (int) [alarmDate timeIntervalSince1970]]; + // We check if recId and alarmDate are nil prior calling -timeIntervalSince1970 + // Weird gcc optimizations can cause issue here. + tRecId = [NSNumber numberWithInt: (recId ? (int)[recId timeIntervalSince1970] : 0)]; + tADate = [NSNumber numberWithInt: (alarmDate ? (int)[alarmDate timeIntervalSince1970] : 0)]; return [NSDictionary dictionaryWithObjectsAndKeys: cname, @"c_name", path, @"c_path", diff --git a/SOPE/NGCards/ChangeLog b/SOPE/NGCards/ChangeLog index f906ac05a..c3dae2208 100644 --- a/SOPE/NGCards/ChangeLog +++ b/SOPE/NGCards/ChangeLog @@ -1,3 +1,9 @@ +2010-11-08 Francis Lachapelle + + * NSString+NGCards.m (-vCardSubvaluesWithSeparator:): now returns + an empty array when the string is empty, instead of an array with + an empty string. + 2010-10-28 Francis Lachapelle * iCalRecurrenceRule.m (-isInfinite): a repeat count set to 0 is diff --git a/SOPE/NGCards/NSString+NGCards.m b/SOPE/NGCards/NSString+NGCards.m index 30280e7f7..d090bfe00 100644 --- a/SOPE/NGCards/NSString+NGCards.m +++ b/SOPE/NGCards/NSString+NGCards.m @@ -322,11 +322,14 @@ static NSString *commaSeparator = nil; } } - substring = [[NSString alloc] initWithCharactersNoCopy: substringBuffer - length: substringLength - freeWhenDone: YES]; - [components addObject: substring]; - [substring release]; + if (substringLength > 0) + { + substring = [[NSString alloc] initWithCharactersNoCopy: substringBuffer + length: substringLength + freeWhenDone: YES]; + [components addObject: substring]; + [substring release]; + } NSZoneFree (NULL, stringBuffer); diff --git a/SoObjects/Mailer/SOGoMailAccount.m b/SoObjects/Mailer/SOGoMailAccount.m index e2d8e45ff..1d2845d66 100644 --- a/SoObjects/Mailer/SOGoMailAccount.m +++ b/SoObjects/Mailer/SOGoMailAccount.m @@ -353,7 +353,22 @@ static NSString *sieveScriptName = @"sogo"; if (!sieveServer) { + NSString *s; + sieveServer = @"localhost"; + s = [dd imapServer]; + + if (s) + { + NSURL *url; + + url = [NSURL URLWithString: s]; + + if ([url host]) + sieveServer = [url host]; + else + sieveServer = s; + } } else { diff --git a/SoObjects/SOGo/SOGoMailer.m b/SoObjects/SOGo/SOGoMailer.m index 13cd16398..44cdffdb6 100644 --- a/SoObjects/SOGo/SOGoMailer.m +++ b/SoObjects/SOGo/SOGoMailer.m @@ -1,6 +1,6 @@ /* SOGoMailer.m - this file is part of SOGo * - * Copyright (C) 2007-2009 Inverse inc. + * Copyright (C) 2007-2010 Inverse inc. * * Author: Wolfgang Sourdeau * @@ -96,12 +96,9 @@ - (NSException *) _sendMailData: (NSData *) mailData withClient: (NGSmtpClient *) client - andRejections: (unsigned int) toErrors { NSException *result; - if (toErrors > 0) - [self logWithFormat: @"sending email despite address rejections"]; if ([client sendData: mailData]) result = nil; else @@ -118,12 +115,13 @@ { NGInternetSocketAddress *addr; NSString *currentTo, *host; + NSMutableArray *toErrors; NSEnumerator *addresses; NGSmtpClient *client; NSException *result; NSRange r; - unsigned int toErrors, port; + unsigned int port; client = [NGSmtpClient smtpClient]; host = smtpServer; @@ -145,7 +143,7 @@ { if ([client mailFrom: sender]) { - toErrors = 0; + toErrors = [NSMutableArray array]; addresses = [recipients objectEnumerator]; currentTo = [addresses nextObject]; while (currentTo) @@ -153,17 +151,21 @@ if (![client recipientTo: [currentTo pureEMailAddress]]) { [self logWithFormat: @"error with recipient '%@'", currentTo]; - toErrors++; + [toErrors addObject: [currentTo pureEMailAddress]]; } currentTo = [addresses nextObject]; } - if (toErrors == [recipients count]) + if ([toErrors count] == [recipients count]) result = [NSException exceptionWithHTTPStatus: 500 reason: @"cannot send message:" @" (smtp) all recipients discarded"]; + else if ([toErrors count] > 0) + result = [NSException exceptionWithHTTPStatus: 500 + reason: [NSString stringWithFormat: + @"cannot send message (smtp) - recipients discarded:\n%@", + [toErrors componentsJoinedByString: @", "]]]; else - result = [self _sendMailData: mailData withClient: client - andRejections: toErrors]; + result = [self _sendMailData: mailData withClient: client]; } else result = [NSException exceptionWithHTTPStatus: 500 diff --git a/UI/MailerUI/UIxMailListActions.m b/UI/MailerUI/UIxMailListActions.m index 834d82337..e43e3e065 100644 --- a/UI/MailerUI/UIxMailListActions.m +++ b/UI/MailerUI/UIxMailListActions.m @@ -558,17 +558,25 @@ - (id ) getSortedUIDsAction { - NSDictionary *data; + id data; + NSString *noHeaders; SOGoMailFolder *folder; + WORequest *request; WOResponse *response; + request = [context request]; response = [context response]; - folder = [self clientObject]; - data = [self getUIDsAndHeadersInFolder: folder]; [response setHeader: @"text/plain; charset=utf-8" forKey: @"content-type"]; + folder = [self clientObject]; + noHeaders = [request formValueForKey: @"no_headers"]; + if ([noHeaders length]) + data = [self getSortedUIDsInFolder: folder]; + else + data = [self getUIDsAndHeadersInFolder: folder]; + [response appendContentString: [data jsonRepresentation]]; - + return response; } diff --git a/UI/MailerUI/product.plist b/UI/MailerUI/product.plist index 4c91aa418..45fa5e6f9 100644 --- a/UI/MailerUI/product.plist +++ b/UI/MailerUI/product.plist @@ -79,17 +79,17 @@ methods = { getMail = { protectedBy = "View"; - actionClass = "UIxMailListActions"; + actionClass = "UIxMailListActions"; actionName = "getMail"; }; uids = { protectedBy = ""; - actionClass = "UIxMailListActions"; + actionClass = "UIxMailListActions"; actionName = "getSortedUIDs"; }; headers = { protectedBy = ""; - actionClass = "UIxMailListActions"; + actionClass = "UIxMailListActions"; actionName = "getHeaders"; }; subscribe = { diff --git a/UI/PreferencesUI/French.lproj/Localizable.strings b/UI/PreferencesUI/French.lproj/Localizable.strings index 424bc2ba4..aa8e60d28 100644 --- a/UI/PreferencesUI/French.lproj/Localizable.strings +++ b/UI/PreferencesUI/French.lproj/Localizable.strings @@ -21,7 +21,7 @@ "contacts_category_labels" = "Ami, Client, Collègue, Concurrent, Famille, Fournisseur, Partenaire d'affaire, Presse, VIP"; /* vacation (auto-reply) */ -"Enable vacation auto reply" = "Activer message d'absense prolongée"; +"Enable vacation auto reply" = "Activer message d'absence prolongée"; "Auto reply message :" = "Message de réponse automatique :"; "Email addresses (separated by commas) :" = "Adresses courriels (séparées par des virgules) :"; "Add default email addresses" = "Ajouter les adresses par défaut"; diff --git a/UI/Templates/ContactsUI/UIxContactEditor.wox b/UI/Templates/ContactsUI/UIxContactEditor.wox index af9c49758..ebb3eb41c 100644 --- a/UI/Templates/ContactsUI/UIxContactEditor.wox +++ b/UI/Templates/ContactsUI/UIxContactEditor.wox @@ -8,6 +8,7 @@ xmlns:label="OGo:label" className="UIxPageFrame" title="name" + const:userDefaultsKeys="SOGoContactsCategories" const:popup="YES" >