From 42f95af7568982b95b1a0189c7b0efcae3adc567 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 1 Jul 2009 15:49:08 +0000 Subject: [PATCH 1/6] Monotone-Parent: 52e582748151e87bfde51bfd7c475d994270767b Monotone-Revision: 6485cacb283ff7fd9905e8d9e8d097a761fc9c39 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-07-01T15:49:08 Monotone-Branch: ca.inverse.sogo --- SOPE/sope-patchset-r1657.diff | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/SOPE/sope-patchset-r1657.diff b/SOPE/sope-patchset-r1657.diff index be579afa4..b15d0e882 100644 --- a/SOPE/sope-patchset-r1657.diff +++ b/SOPE/sope-patchset-r1657.diff @@ -4024,6 +4024,22 @@ Index: sope-appserver/NGObjWeb/GNUmakefile.postamble - $(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)/wobundle.make -endif + $(DESTDIR)/$(GNUSTEP_MAKEFILES)/wobundle.make +Index: sope-appserver/NGObjWeb/ChangeLog +=================================================================== +--- sope-appserver/NGObjWeb/ChangeLog (revision 1660) ++++ sope-appserver/NGObjWeb/ChangeLog (working copy) +@@ -1,3 +1,11 @@ ++2009-07-01 Wolfgang Sourdeau ++ ++ * WOHttpAdaptor/WOHttpTransaction.m ++ (-deliverResponse:toRequest:onStream:): we test the content-length ++ and impose a content-type of text/plain when 0. This work-arounds ++ a bug in Mozilla clients where empty responses with a content-type ++ set to X/xml will trigger an exception. ++ + 2009-06-10 Helge Hess + + * DAVPropMap.plist: mapped {DAV:}current-user-principal (v4.9.37) Index: sope-appserver/NGObjWeb/WODirectAction.m =================================================================== --- sope-appserver/NGObjWeb/WODirectAction.m (revision 1660) @@ -4274,3 +4290,36 @@ Index: sope-appserver/NGObjWeb/SoObjects/SoObject.m } } +Index: sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m +=================================================================== +--- sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (revision 1660) ++++ sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (working copy) +@@ -696,7 +696,7 @@ + *(&out) = nil; + + [self _httpValidateResponse:_response]; +- ++ + out = [(NGCTextStream *)[NGCTextStream alloc] initWithSource:_out]; + + NS_DURING { +@@ -705,6 +705,7 @@ + id body; + BOOL doZip; + BOOL isok = YES; ++ int length; + + doZip = [_response shouldZipResponseToRequest:_request]; + +@@ -738,7 +739,10 @@ + + /* add content length header */ + +- snprintf((char *)buf, sizeof(buf), "%d", [body length]); ++ if ((length = [body length]) == 0) { ++ [_response setHeader:@"text/plain" forKey:@"content-type"]; ++ } ++ snprintf((char *)buf, sizeof(buf), "%d", length); + t1 = [[NSString alloc] initWithCString:(char *)buf]; + [_response setHeader:t1 forKey:@"content-length"]; + [t1 release]; t1 = nil; From 79d23608d488898d54e84a6c374f4df4672f3446 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 1 Jul 2009 19:27:34 +0000 Subject: [PATCH 2/6] Monotone-Parent: 6485cacb283ff7fd9905e8d9e8d097a761fc9c39 Monotone-Revision: ceeb01446ec3ddc689505cb7bb9f3110f23ad06d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-07-01T19:27:34 Monotone-Branch: ca.inverse.sogo --- UI/Common/WODirectAction+SOGo.m | 2 +- UI/SOGoUI/UIxComponent.m | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/UI/Common/WODirectAction+SOGo.m b/UI/Common/WODirectAction+SOGo.m index d6395ad33..ee6338da1 100644 --- a/UI/Common/WODirectAction+SOGo.m +++ b/UI/Common/WODirectAction+SOGo.m @@ -40,7 +40,7 @@ response = [context response]; [response setStatus: status]; [response setHeader: @"text/plain; charset=utf-8" - forKey: @"Content-Type"]; + forKey: @"content-type"]; return response; } diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index 8e5a5c7d6..e34621427 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -602,7 +602,6 @@ static BOOL uixDebugEnabled = NO; response = [context response]; [response setStatus: status]; - [response setHeader: @"text/plain" forKey: @"Content-Type"]; return response; } From 5a3163c1f1c23bbc0f2aa8121426a241f34ebbb0 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 1 Jul 2009 19:27:44 +0000 Subject: [PATCH 3/6] Monotone-Parent: ceeb01446ec3ddc689505cb7bb9f3110f23ad06d Monotone-Revision: 4540bdac2b25e94022f859ccd01e9fd4f28ef349 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-07-01T19:27:44 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/Appointments/SOGoAppointmentFolder.m | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e636756ac..af3c13944 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-07-01 Wolfgang Sourdeau + + * SoObjects/Appointments/SOGoAppointmentFolder.m + (-lookupName:inContext:acquire:): handle "AsTask" and + "AsAppointment" url suffix only for the default "so" handler. + 2009-07-01 Cyril Robert * SoObjects/SOGo/SOGoGCSFolder.m: Remove color from user settings on diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 7a6295296..6ea25fe7d 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -64,6 +64,7 @@ #import #import #import +#import #import "iCalEntityObject+SOGo.h" #import "SOGoAppointmentObject.h" @@ -1937,6 +1938,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir id obj; NSString *url; BOOL handledLater; + WORequest *rq; /* first check attributes directly bound to the application */ handledLater = [self requestNamedIsHandledLater: _key]; @@ -1947,9 +1949,11 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir obj = [super lookupName:_key inContext:_ctx acquire:NO]; if (!obj) { - if ([self isValidContentName:_key]) + rq = [_ctx request]; + if ([self isValidContentName:_key] + && [rq handledByDefaultHandler]) { - url = [[[_ctx request] uri] urlWithoutParameters]; + url = [[rq uri] urlWithoutParameters]; if ([url hasSuffix: @"AsTask"]) obj = [SOGoTaskObject objectWithName: _key inContainer: self]; From 733cc4f9e7f2bdeb70d6378737acd3c7d0bf9d12 Mon Sep 17 00:00:00 2001 From: C Robert Date: Wed, 1 Jul 2009 19:28:44 +0000 Subject: [PATCH 4/6] Monotone-Parent: 52e582748151e87bfde51bfd7c475d994270767b Monotone-Revision: cc4465af2bc376a873ae8e59faf33b86548f08b3 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-07-01T19:28:44 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 2 ++ UI/MailerUI/UIxMailFolderActions.m | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e636756ac..67edd4843 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * SoObjects/SOGo/SOGoGCSFolder.m: Remove color from user settings on unsubscribe. + * UI/MailerUI/UIxMailFolderActions.m (_trashedURLOfFolder:withCO:): Fixed + issue when deleting a folder with the same name as one already in the Trash. 2009-06-30 Wolfgang Sourdeau diff --git a/UI/MailerUI/UIxMailFolderActions.m b/UI/MailerUI/UIxMailFolderActions.m index 27a381d4a..81a056d1c 100644 --- a/UI/MailerUI/UIxMailFolderActions.m +++ b/UI/MailerUI/UIxMailFolderActions.m @@ -139,13 +139,33 @@ withCO: (SOGoMailFolder *) co { NSURL *destURL; - NSString *trashFolderName, *folderName, *path; + NSString *trashFolderName, *folderName, *path, *testPath; + NGImap4Connection *connection; + int i = 1; + id test; + + connection = [co imap4Connection]; folderName = [[srcURL path] lastPathComponent]; trashFolderName = [[co mailAccountFolder] trashFolderNameInContext: context]; path = [NSString stringWithFormat: @"/%@/%@", trashFolderName, folderName]; + testPath = path; + while ( i < 10 ) + { + test = [[connection client] select: testPath]; + if (test && [[test objectForKey: @"result"] boolValue]) + { + testPath = [NSString stringWithFormat: @"%@%x", path, i]; + i++; + } + else + { + path = testPath; + break; + } + } destURL = [[NSURL alloc] initWithScheme: [srcURL scheme] host: [srcURL host] path: path]; [destURL autorelease]; From 8b51d0728f4a147affb295ead5437646eefdc7ea Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 1 Jul 2009 19:58:44 +0000 Subject: [PATCH 5/6] Monotone-Parent: 4540bdac2b25e94022f859ccd01e9fd4f28ef349 Monotone-Revision: 5547fe230efee84f5079734d9e6dccd6e02bc161 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-07-01T19:58:44 Monotone-Branch: ca.inverse.sogo --- SOPE/sope-patchset-r1657.diff | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/SOPE/sope-patchset-r1657.diff b/SOPE/sope-patchset-r1657.diff index b15d0e882..043e5ff28 100644 --- a/SOPE/sope-patchset-r1657.diff +++ b/SOPE/sope-patchset-r1657.diff @@ -969,6 +969,15 @@ Index: sope-mime/NGImap4/NGImap4Connection.m #include "imCommon.h" @implementation NGImap4Connection +@@ -66,7 +67,7 @@ + self->creationTime = [[NSDate alloc] init]; + + // TODO: retrieve from IMAP4 instead of using a default +- self->separator = imap4Separator; ++ self->separator = [imap4Separator copy]; + } + return self; + } @@ -321,13 +322,15 @@ return nil; if ([folderName characterAtIndex:0] == '/') @@ -1671,7 +1680,13 @@ Index: sope-mime/NGImap4/ChangeLog =================================================================== --- sope-mime/NGImap4/ChangeLog (revision 1660) +++ sope-mime/NGImap4/ChangeLog (working copy) -@@ -1,3 +1,39 @@ +@@ -1,3 +1,45 @@ ++2009-07-01 Wolfgang Sourdeau ++ ++ * NGImap4Connection.m (-initWithClient:password:): we need to copy ++ the imap4Separator, otherwise it will be released when the connection ++ is deallocated. ++ +2009-06-15 Wolfgang Sourdeau + + * NSString+Imap4.m (-stringByEncodingImap4FolderName, From ae87e98bf29ad43bd24ffd6ca405766ae16d55af Mon Sep 17 00:00:00 2001 From: C Robert Date: Wed, 1 Jul 2009 20:09:26 +0000 Subject: [PATCH 6/6] Monotone-Parent: 856583f8779d38a6978fe4db950c4067c8a38e9c Monotone-Revision: 198c312f6f50dd9e647df21a626b63d5737a368b Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-07-01T20:09:26 Monotone-Branch: ca.inverse.sogo --- UI/WebServerResources/ContactsUI.js | 3 +++ UI/WebServerResources/MailerUI.js | 6 +++++- UI/WebServerResources/scriptaculous/dragdrop.js | 9 +++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index 6d9e8c8df..540167649 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -603,6 +603,7 @@ function appendAddressBook(name, folder) { .replace(">", ">", "g"))); setEventsOnAddressBook(li); updateAddressBooksMenus(); + configureDragAndDrop (); } return result; @@ -1066,6 +1067,8 @@ function initContacts(event) { } function configureDragAndDrop () { + Droppables.empty (); + Draggables.empty (); var mainElement = new Element ("div", {id: "dragDropVisual"}); document.body.appendChild(mainElement); mainElement.absolutize (); diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js index 4ae23cb17..486ae86d8 100644 --- a/UI/WebServerResources/MailerUI.js +++ b/UI/WebServerResources/MailerUI.js @@ -660,8 +660,8 @@ function messageListCallback(http) { table = $('messageList'); configureMessageListEvents(table); TableKit.Resizable.init(table, {'trueResize' : true, 'keepWidth' : true}); - setTimeout ('configureDragAndDrop ();', 500); } + configureDragAndDrop (); configureMessageListBodyEvents(table); var selected = http.callbackData; @@ -1756,6 +1756,7 @@ function onLoadMailboxesCallback(http) { checkAjaxRequestsState(); getFoldersState(); updateStatusFolders(); + configureDragAndDrop (); } } else @@ -2231,6 +2232,9 @@ Mailbox.prototype = { function configureDragAndDrop () { + Droppables.empty (); + Draggables.empty (); + var mainElement = new Element ("div", {id: "dragDropVisual"}); document.body.appendChild(mainElement); mainElement.absolutize (); diff --git a/UI/WebServerResources/scriptaculous/dragdrop.js b/UI/WebServerResources/scriptaculous/dragdrop.js index 61b1e7bdb..9e4ac5920 100644 --- a/UI/WebServerResources/scriptaculous/dragdrop.js +++ b/UI/WebServerResources/scriptaculous/dragdrop.js @@ -12,6 +12,10 @@ if(Object.isUndefined(Effect)) var Droppables = { drops: [], + empty: function () { + this.drops = []; + }, + remove: function(element) { this.drops = this.drops.reject(function(d) { return d.element==$(element) }); }, @@ -129,6 +133,11 @@ var Draggables = { drags: [], observers: [], + empty: function () { + this.drags = []; + this.observers = []; + }, + register: function(draggable) { if(this.drags.length == 0) { this.eventMouseUp = this.endDrag.bindAsEventListener(this);