From ebeb8dc71cee941a3a75d1f2115a3a02a9b02701 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Thu, 8 Nov 2007 21:59:19 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1252 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ChangeLog | 10 ++++++++++ SoObjects/Contacts/SOGoContactGCSFolder.m | 1 + SoObjects/Contacts/SOGoContactLDAPFolder.m | 3 ++- SoObjects/Mailer/SOGoMailObject+Draft.m | 1 + SoObjects/SOGo/AgenorUserDefaults.m | 1 + SoObjects/SOGo/SOGoDateFormatter.m | 1 + SoObjects/SOGo/SOGoGCSFolder.m | 10 +++++----- SoObjects/SOGo/SOGoUser.m | 10 +++++----- UI/Common/common.h | 1 + UI/MailPartViewers/UIxMailPartHTMLViewer.m | 2 +- UI/MailerUI/UIxMailListView.m | 3 +-- 11 files changed, 29 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index fddc5fa7..01b581ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2007-11-08 Wolfgang Sourdeau + * UI/MailPartViewers/UIxMailPartHTMLViewer.m + ([UIxMailPartHTMLViewer -_attachmentIds]): the reference was one + character too short, which cause the images not to be displayed + sometimes and crashes to happen whenever the references on a + message were wrong (due to bugs in SOPE). + + * UI/MailerUI/UIxMailListView.m ([UIxMailListView + -hasMessageAttachment]): consider an attachment any content that + has a non-nil disposition. + * SoObjects/SOGo/SOGoParentFolder.m ([SOGoParentFolder -newFolderWithName:nameandNameInContainer:newNameInContainer]): fixed method to make use of the parameters instead of the useless diff --git a/SoObjects/Contacts/SOGoContactGCSFolder.m b/SoObjects/Contacts/SOGoContactGCSFolder.m index e917d40c..f8a7b4a2 100644 --- a/SoObjects/Contacts/SOGoContactGCSFolder.m +++ b/SoObjects/Contacts/SOGoContactGCSFolder.m @@ -26,6 +26,7 @@ #import #import #import +#import #import #import #import diff --git a/SoObjects/Contacts/SOGoContactLDAPFolder.m b/SoObjects/Contacts/SOGoContactLDAPFolder.m index dd1bfd3c..d47883f1 100644 --- a/SoObjects/Contacts/SOGoContactLDAPFolder.m +++ b/SoObjects/Contacts/SOGoContactLDAPFolder.m @@ -25,10 +25,11 @@ #import #import -#import #import #import #import +#import +#import #import #import #import diff --git a/SoObjects/Mailer/SOGoMailObject+Draft.m b/SoObjects/Mailer/SOGoMailObject+Draft.m index 3b406d1b..91f3a17a 100644 --- a/SoObjects/Mailer/SOGoMailObject+Draft.m +++ b/SoObjects/Mailer/SOGoMailObject+Draft.m @@ -23,6 +23,7 @@ #import #import +#import #import #import #import diff --git a/SoObjects/SOGo/AgenorUserDefaults.m b/SoObjects/SOGo/AgenorUserDefaults.m index e5b541ea..156b4ffe 100644 --- a/SoObjects/SOGo/AgenorUserDefaults.m +++ b/SoObjects/SOGo/AgenorUserDefaults.m @@ -19,6 +19,7 @@ 02111-1307, USA. */ +#import #import #import #import diff --git a/SoObjects/SOGo/SOGoDateFormatter.m b/SoObjects/SOGo/SOGoDateFormatter.m index 9bddd762..97eb90b5 100644 --- a/SoObjects/SOGo/SOGoDateFormatter.m +++ b/SoObjects/SOGo/SOGoDateFormatter.m @@ -19,6 +19,7 @@ 02111-1307, USA. */ +#import #import #import diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 45cf0663..cf6f1296 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -61,10 +61,10 @@ static NSString *defaultUserID = @""; { id newFolder; NSArray *elements, *pathElements; - NSString *ocsPath, *objectPath, *owner, *ocsName, *folderName; + NSString *ocsPath, *objectPath, *login, *ocsName, *folderName; elements = [reference componentsSeparatedByString: @":"]; - owner = [elements objectAtIndex: 0]; + login = [elements objectAtIndex: 0]; objectPath = [elements objectAtIndex: 1]; pathElements = [objectPath componentsSeparatedByString: @"/"]; if ([pathElements count] > 1) @@ -73,12 +73,12 @@ static NSString *defaultUserID = @""; ocsName = @"personal"; ocsPath = [NSString stringWithFormat: @"/Users/%@/%@/%@", - owner, [pathElements objectAtIndex: 0], ocsName]; - folderName = [NSString stringWithFormat: @"%@_%@", owner, ocsName]; + login, [pathElements objectAtIndex: 0], ocsName]; + folderName = [NSString stringWithFormat: @"%@_%@", login, ocsName]; newFolder = [[self alloc] initWithName: folderName inContainer: aContainer]; [newFolder setOCSPath: ocsPath]; - [newFolder setOwner: owner]; + [newFolder setOwner: login]; return newFolder; } diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index 64671657..9ffdfc6e 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -108,17 +108,17 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek"; { NSArray *bLanguages; WOContext *context; - NSString *language; + NSString *lng; context = [[WOApplication application] context]; bLanguages = [[context request] browserLanguages]; if ([bLanguages count] > 0) - language = [bLanguages objectAtIndex: 0]; + lng = [bLanguages objectAtIndex: 0]; - if (![language length]) - language = defaultLanguage; + if (![lng length]) + lng = defaultLanguage; - return language; + return lng; } + (SOGoUser *) userWithLogin: (NSString *) newLogin diff --git a/UI/Common/common.h b/UI/Common/common.h index 9c254948..2a816fbb 100644 --- a/UI/Common/common.h +++ b/UI/Common/common.h @@ -23,6 +23,7 @@ #import #import #import +#import #import #import #import diff --git a/UI/MailPartViewers/UIxMailPartHTMLViewer.m b/UI/MailPartViewers/UIxMailPartHTMLViewer.m index 4dbda7c4..fbe39301 100644 --- a/UI/MailPartViewers/UIxMailPartHTMLViewer.m +++ b/UI/MailPartViewers/UIxMailPartHTMLViewer.m @@ -449,7 +449,7 @@ url = [NSMutableString new]; [url appendString: baseURL]; [url appendFormat: @"/%@", [partPath componentsJoinedByString: @"/"]]; - [url deleteCharactersInRange: NSMakeRange([url length] - 3, 2)]; + [url deleteCharactersInRange: NSMakeRange([url length] - 2, 2)]; parts = [[parent bodyInfo] objectForKey: @"parts"]; max = [parts count]; for (count = 0; count < max; count++) diff --git a/UI/MailerUI/UIxMailListView.m b/UI/MailerUI/UIxMailListView.m index ed4d74f4..13cf5fc4 100644 --- a/UI/MailerUI/UIxMailListView.m +++ b/UI/MailerUI/UIxMailListView.m @@ -221,8 +221,7 @@ = [[parts objectsForKey: @"disposition"] objectEnumerator]; while (!hasAttachment && (currentDisp = [dispositions nextObject])) - hasAttachment = ([[currentDisp objectForKey: @"type"] - isEqualToString: @"ATTACHMENT"]); + hasAttachment = ([currentDisp objectForKey: @"type"]); } return hasAttachment; -- 2.39.5