mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-07 22:38:51 +00:00
Fixed an error when composing from address book
Monotone-Parent: b092fe6aebfa4e00c827df976eaa7e49cb1c6539 Monotone-Revision: 97fb6bc6ccca9d15df3776811dafe8ad42650b90 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-29T21:07:22 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
PUT on a non-existing object.
|
||||
* UI/MailerUI/UIxMailMainFrame.m (mailAccounts): Changed the return value to
|
||||
include both the account name and display name.
|
||||
* UI/MailerUI/UIxMailMainFrame.m: Fixed an error when composing from the
|
||||
Address Book module.
|
||||
|
||||
2009-09-29 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#import <SoObjects/Mailer/SOGoMailAccounts.h>
|
||||
#import <SoObjects/SOGo/NSDictionary+URL.h>
|
||||
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/SOGoUserFolder.h>
|
||||
@@ -175,7 +176,7 @@
|
||||
{
|
||||
id contact;
|
||||
NSArray *accounts, *contactsId, *cards;
|
||||
NSString *firstAccount, *newLocation, *parameters, *folderId, *uid;
|
||||
NSString *firstAccount, *firstEscapedAccount, *newLocation, *parameters, *folderId, *uid;
|
||||
NSEnumerator *uids;
|
||||
NSMutableArray *addresses;
|
||||
NGVCard *card;
|
||||
@@ -192,7 +193,8 @@
|
||||
// We use the first mail account
|
||||
accounts = [[context activeUser] mailAccounts];
|
||||
firstAccount = [[accounts objectsForKey: @"name" notFoundMarker: nil]
|
||||
objectAtIndex: 0];
|
||||
objectAtIndex: 0];
|
||||
firstEscapedAccount = [firstAccount asCSSIdentifier];
|
||||
request = [context request];
|
||||
|
||||
if ((folderId = [request formValueForKey: @"folder"]) &&
|
||||
@@ -237,7 +239,8 @@
|
||||
}
|
||||
|
||||
if ([addresses count] > 0)
|
||||
parameters = [NSString stringWithFormat: @"?mailto=%@", [addresses componentsJoinedByString: @","]];
|
||||
parameters = [NSString stringWithFormat: @"?mailto=%@",
|
||||
[addresses componentsJoinedByString: @","]];
|
||||
}
|
||||
}
|
||||
else if ([[request formValues] objectForKey: @"mailto"])
|
||||
@@ -250,7 +253,7 @@
|
||||
|
||||
newLocation = [NSString stringWithFormat: @"%@/%@/compose%@",
|
||||
[co baseURLInContext: context],
|
||||
firstAccount,
|
||||
firstEscapedAccount,
|
||||
parameters];
|
||||
|
||||
return [self redirectToLocation: newLocation];
|
||||
|
||||
Reference in New Issue
Block a user