merge of '27e4a971509238d8a77bcdbd70c00f4fc4202a00'

and '310656e43745cf03a754d629917e6024ec566244'

Monotone-Parent: 27e4a971509238d8a77bcdbd70c00f4fc4202a00
Monotone-Parent: 310656e43745cf03a754d629917e6024ec566244
Monotone-Revision: a6eb90bb705891f429bad2f9b15a3fc4f18c040c

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-07-01T20:21:46
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle 2009-07-01 20:21:46 +00:00
commit 9506b6dade
9 changed files with 118 additions and 7 deletions

View file

@ -1,7 +1,15 @@
2009-07-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Appointments/SOGoAppointmentFolder.m
(-lookupName:inContext:acquire:): handle "AsTask" and
"AsAppointment" url suffix only for the default "so" handler.
2009-07-01 Cyril Robert <crobert@inverse.ca>
* 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 Francis Lachapelle <flachapelle@inverse.ca>

View file

@ -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 <wsourdeau@inverse.ca>
+
+ * 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 <wsourdeau@inverse.ca>
+
+ * NSString+Imap4.m (-stringByEncodingImap4FolderName,
@ -4024,6 +4039,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 <wsourdeau@inverse.ca>
+
+ * 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 <helge.hess@opengroupware.org>
* 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 +4305,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;

View file

@ -64,6 +64,7 @@
#import <SOGo/SOGoUserFolder.h>
#import <SOGo/SOGoWebDAVAclManager.h>
#import <SOGo/SOGoWebDAVValue.h>
#import <SOGo/WORequest+SOGo.h>
#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];

View file

@ -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;
}

View file

@ -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];

View file

@ -602,7 +602,6 @@ static BOOL uixDebugEnabled = NO;
response = [context response];
[response setStatus: status];
[response setHeader: @"text/plain" forKey: @"Content-Type"];
return response;
}

View file

@ -603,6 +603,7 @@ function appendAddressBook(name, folder) {
.replace("&gt;", ">", "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 ();

View file

@ -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 ();

View file

@ -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);