mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 12:25:23 +00:00
merge of 'b68be9f250b22568280f0f3fe29f6b42ed225aa1'
and 'c4ca1fc9171a84aed3074955c7d96c02bf3ae9ad' Monotone-Parent: b68be9f250b22568280f0f3fe29f6b42ed225aa1 Monotone-Parent: c4ca1fc9171a84aed3074955c7d96c02bf3ae9ad Monotone-Revision: 6753ccaa7526439dbf30f82e0fd9724d49478e83 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-12-06T21:10:14 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -9,6 +9,17 @@
|
||||
* UI/Scheduler/UIxCalListingActions.m ([UIxCalListingActions
|
||||
-eventsListAction]): added support for sorting events.
|
||||
|
||||
2007-12-06 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/MailerUI/UIxMailEditor.m ([UIxMailEditor -saveAction])
|
||||
([UIxMailEditor -sendAction]): make sure that the attachments
|
||||
having the same filename are correctly sequenced (ex: base.ext,
|
||||
base-1.ext, base-2.ext).
|
||||
|
||||
* SoObjects/Mailer/SOGoMailBodyPart.m ([SOGoMailBodyPart
|
||||
-fetchBLOB]): added support for quoted-printable decoding. Also,
|
||||
we return nil if the type is not supported.
|
||||
|
||||
2007-12-05 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxTaskEditor.m ([UIxTaskEditor -newAction]):
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#import <NGExtensions/NSNull+misc.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
#import <NGExtensions/NGBase64Coding.h>
|
||||
#import <NGExtensions/NGQuotedPrintableCoding.h>
|
||||
#import <NGImap4/NGImap4Connection.h>
|
||||
|
||||
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
|
||||
@@ -209,16 +210,22 @@ static BOOL debugOn = NO;
|
||||
|
||||
if (enc)
|
||||
{
|
||||
enc = [enc uppercaseString];
|
||||
enc = [enc lowercaseString];
|
||||
|
||||
if ([enc isEqualToString:@"BASE64"])
|
||||
if ([enc isEqualToString: @"base64"])
|
||||
data = [data dataByDecodingBase64];
|
||||
else if ([enc isEqualToString:@"7BIT"])
|
||||
else if ([enc isEqualToString: @"quoted-printable"])
|
||||
data = [data dataByDecodingQuotedPrintableTransferEncoding];
|
||||
else if ([enc isEqualToString: @"7bit"]
|
||||
|| [enc isEqualToString: @"8bit"])
|
||||
; /* keep data as is */ // TODO: do we need to change encodings?
|
||||
else
|
||||
[self errorWithFormat:@"unsupported encoding: %@", enc];
|
||||
{
|
||||
data = nil;
|
||||
[self errorWithFormat: @"unsupported encoding: %@", enc];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
/* these are for the inline attachment list */
|
||||
NSString *attachmentName;
|
||||
NSArray *attachmentNames;
|
||||
NSMutableArray *attachedFiles;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -115,6 +116,7 @@ static NSArray *infoKeys = nil;
|
||||
[bcc release];
|
||||
[attachmentName release];
|
||||
[attachmentNames release];
|
||||
[attachedFiles release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@@ -262,6 +264,29 @@ static NSArray *infoKeys = nil;
|
||||
}
|
||||
|
||||
/* actions */
|
||||
- (NSString *) _fixedFilename: (NSString *) filename
|
||||
{
|
||||
NSString *newFilename, *baseFilename, *extension;
|
||||
unsigned int variation;
|
||||
|
||||
if (!attachedFiles)
|
||||
attachedFiles = [NSMutableArray new];
|
||||
|
||||
newFilename = filename;
|
||||
|
||||
baseFilename = [filename stringByDeletingPathExtension];
|
||||
extension = [filename pathExtension];
|
||||
variation = 0;
|
||||
while ([attachedFiles containsObject: newFilename])
|
||||
{
|
||||
variation++;
|
||||
newFilename = [NSString stringWithFormat: @"%@-%d.%@", baseFilename,
|
||||
variation, extension];
|
||||
}
|
||||
[attachedFiles addObject: newFilename];
|
||||
|
||||
return newFilename;
|
||||
}
|
||||
|
||||
- (NSDictionary *) _scanAttachmentFilenamesInRequest: (id) httpBody
|
||||
{
|
||||
@@ -271,7 +296,7 @@ static NSArray *infoKeys = nil;
|
||||
unsigned int count, max;
|
||||
NGMimeBodyPart *part;
|
||||
NGMimeContentDispositionHeaderField *header;
|
||||
NSString *mimeType;
|
||||
NSString *mimeType, *filename;
|
||||
|
||||
parts = [httpBody parts];
|
||||
max = [parts count];
|
||||
@@ -284,8 +309,9 @@ static NSArray *infoKeys = nil;
|
||||
[part headerForKey: @"content-disposition"];
|
||||
mimeType = [(NGMimeType *)
|
||||
[part headerForKey: @"content-type"] stringValue];
|
||||
filename = [self _fixedFilename: [header filename]];
|
||||
attachment = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[header filename], @"filename",
|
||||
filename, @"filename",
|
||||
mimeType, @"mimetype", nil];
|
||||
[filenames setObject: attachment forKey: [header name]];
|
||||
}
|
||||
@@ -370,12 +396,12 @@ static NSArray *infoKeys = nil;
|
||||
{
|
||||
NSArray *a;
|
||||
|
||||
if (attachmentNames != nil)
|
||||
return attachmentNames;
|
||||
|
||||
a = [[self clientObject] fetchAttachmentNames];
|
||||
a = [a sortedArrayUsingSelector: @selector (compare:)];
|
||||
attachmentNames = [a copy];
|
||||
if (attachmentNames)
|
||||
{
|
||||
a = [[self clientObject] fetchAttachmentNames];
|
||||
a = [a sortedArrayUsingSelector: @selector (compare:)];
|
||||
attachmentNames = [a copy];
|
||||
}
|
||||
|
||||
return attachmentNames;
|
||||
}
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<form name="searchform" var:href="view" var:_sort="sortKey"
|
||||
onsubmit="return onSearchFormSubmit();" method="GET">
|
||||
<!-- var:if condition="isPopup" const:negate="YES" -->
|
||||
<!-- <var:if condition="hideFolderTree" const:negate="YES" -->
|
||||
<div class="contactFoldersList" id="contactFoldersList">
|
||||
@@ -95,7 +93,6 @@
|
||||
<!-- var:if condition="isPopup">
|
||||
var:component-content />
|
||||
/var:if> -->
|
||||
</form>
|
||||
|
||||
<var:string value="errorAlertJavaScript" const:escapeHTML="NO" />
|
||||
</var:if>
|
||||
|
||||
@@ -920,7 +920,7 @@ function onSearchKeyDown(event) {
|
||||
|
||||
if (event.keyCode == 13) {
|
||||
onSearchFormSubmit();
|
||||
event.preventDefault();
|
||||
preventDefault(event);
|
||||
}
|
||||
else
|
||||
this.timer = setTimeout("onSearchFormSubmit()", 1000);
|
||||
|
||||
Reference in New Issue
Block a user