mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 03:15:25 +00:00
propagate from branch 'ca.inverse.sogo.1_3_13' (head bbb9fd8c5076db6a340935f8f7dba98b04c5b353)
to branch 'ca.inverse.sogo' (head 46315e3df3a804021e11c1adbe9642bbb8807c09) Monotone-Parent: 46315e3df3a804021e11c1adbe9642bbb8807c09 Monotone-Parent: bbb9fd8c5076db6a340935f8f7dba98b04c5b353 Monotone-Revision: d33b0adee86f35e2abaffd30306c1e5ed174b08c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-06T20:33:31 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
2012-03-06 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailFolder.m
|
||||
(-archiveUIDs:inArchiveNamed:inContext:): output filename is now
|
||||
escaped without its extension.
|
||||
|
||||
* SoObjects/Contacts/NGVCard+SOGo.m
|
||||
(-_setupEmailFieldsInLDIFRecord:): simplified code and fixed a bug
|
||||
where the home mail would be taken for both first and second email
|
||||
fields when no work mail was present.
|
||||
|
||||
2012-03-02 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreAppointmentWrapper.m,,
|
||||
|
||||
@@ -351,40 +351,38 @@ convention:
|
||||
- (void) _setupEmailFieldsInLDIFRecord: (NSMutableDictionary *) ldifRecord
|
||||
{
|
||||
NSArray *elements;
|
||||
NSString *workMail, *homeMail, *potential;
|
||||
unsigned int max;
|
||||
NSString *workMail, *homeMail, *mail, *secondEmail;
|
||||
NSUInteger max;
|
||||
|
||||
elements = [self childrenWithTag: @"email"];
|
||||
max = [elements count];
|
||||
workMail = [self _simpleValueForType: @"work"
|
||||
inArray: elements excluding: nil];
|
||||
homeMail = [self _simpleValueForType: @"home"
|
||||
inArray: elements excluding: nil];
|
||||
|
||||
max = [elements count];
|
||||
if (max > 0)
|
||||
{
|
||||
potential = [[elements objectAtIndex: 0] flattenedValuesForKey: @""];
|
||||
if (!workMail)
|
||||
{
|
||||
if (homeMail && homeMail == potential)
|
||||
{
|
||||
if (max > 1)
|
||||
workMail = [[elements objectAtIndex: 1] flattenedValuesForKey: @""];
|
||||
}
|
||||
else
|
||||
workMail = potential;
|
||||
}
|
||||
if (!homeMail && max > 1)
|
||||
{
|
||||
if (workMail && workMail == potential)
|
||||
homeMail = [[elements objectAtIndex: 1] flattenedValuesForKey: @""];
|
||||
else
|
||||
homeMail = potential;
|
||||
}
|
||||
}
|
||||
workMail = [self _simpleValueForType: @"work"
|
||||
inArray: elements excluding: nil];
|
||||
homeMail = [self _simpleValueForType: @"home"
|
||||
inArray: elements excluding: nil];
|
||||
|
||||
[self _setValue: @"mail" to: workMail inLDIFRecord: ldifRecord];
|
||||
[self _setValue: @"mozillasecondemail" to: homeMail inLDIFRecord: ldifRecord];
|
||||
mail = workMail;
|
||||
if (mail)
|
||||
secondEmail = homeMail;
|
||||
else
|
||||
{
|
||||
secondEmail = nil;
|
||||
mail = homeMail;
|
||||
}
|
||||
|
||||
if (!mail)
|
||||
{
|
||||
mail = [elements objectAtIndex: 0];
|
||||
if (max > 1) /* we know secondEmail is not set here either... */
|
||||
secondEmail = [elements objectAtIndex: 1];
|
||||
}
|
||||
|
||||
[self _setValue: @"mail" to: mail inLDIFRecord: ldifRecord];
|
||||
[self _setValue: @"mozillasecondemail" to: secondEmail inLDIFRecord: ldifRecord];
|
||||
}
|
||||
|
||||
[self _setValue: @"mozillausehtmlmail"
|
||||
to: [[self uniqueChildWithTag: @"x-mozilla-html"]
|
||||
|
||||
@@ -482,7 +482,7 @@ static NSString *defaultUserID = @"anyone";
|
||||
{
|
||||
NSException *error;
|
||||
NSFileManager *fm;
|
||||
NSString *spoolPath, *fileName, *zipPath, *qpFileName;
|
||||
NSString *spoolPath, *fileName, *baseName, *extension, *zipPath, *qpFileName;
|
||||
NSDictionary *msgs;
|
||||
NSArray *messages;
|
||||
NSData *content, *zipContent;
|
||||
@@ -547,7 +547,17 @@ static NSString *defaultUserID = @"anyone";
|
||||
}
|
||||
|
||||
response = [context response];
|
||||
qpFileName = [archiveName asQPSubjectString: @"utf-8"];
|
||||
|
||||
baseName = [archiveName stringByDeletingPathExtension];
|
||||
extension = [archiveName pathExtension];
|
||||
if ([extension length] > 0)
|
||||
extension = [@"." stringByAppendingString: extension];
|
||||
else
|
||||
extension = @"";
|
||||
|
||||
qpFileName = [NSString stringWithFormat: @"%@%@",
|
||||
[baseName asQPSubjectString: @"utf-8"],
|
||||
extension];
|
||||
[response setHeader: [NSString stringWithFormat: @"application/zip;"
|
||||
@" name=\"%@\"",
|
||||
qpFileName]
|
||||
|
||||
Reference in New Issue
Block a user