merge of '0bd8de88352206932cbf2a15ae603a90b79e6e44'
and 'b4cdf2c0fe2ace70d873c007f3fd15f64aa0f91a' Monotone-Parent: 0bd8de88352206932cbf2a15ae603a90b79e6e44 Monotone-Parent: b4cdf2c0fe2ace70d873c007f3fd15f64aa0f91a Monotone-Revision: 0a9ebb81d46a0321c166273fb763ad39c233cc50 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-03-13T22:55:00 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
commit
5faf904b4a
16
ChangeLog
16
ChangeLog
|
@ -1,7 +1,23 @@
|
||||||
|
2009-03-13 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||||
|
|
||||||
|
* Optimized the IMAP client code to avoid
|
||||||
|
unnecessary STATUS calls.
|
||||||
|
|
||||||
2009-03-12 Ludovic Marcotte <lmarcotte@inverse.ca>
|
2009-03-12 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||||
|
|
||||||
* Updated the SOPE patchset in order to
|
* Updated the SOPE patchset in order to
|
||||||
fix a bug in NGMimeBodyParser.
|
fix a bug in NGMimeBodyParser.
|
||||||
|
* Updated again the SOPE patchset to enable
|
||||||
|
MySQL support.
|
||||||
|
|
||||||
|
2009-03-11 Francis Lachapelle <flachapelle@inverse.ca>
|
||||||
|
|
||||||
|
* UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage
|
||||||
|
-readFreeBusyAction]): we now set the content-type to "text/plain"
|
||||||
|
to fix issues with nginx.
|
||||||
|
|
||||||
|
* UI/Contacts/UIxContactFoldersView.m ([UIxContactFoldersView
|
||||||
|
-contactSearchAction]): idem.
|
||||||
|
|
||||||
2009-03-11 Ludovic Marcotte <lmarcotte@inverse.ca>
|
2009-03-11 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,62 @@ Index: sope-gdl1/PostgreSQL/PostgreSQL72Channel.m
|
||||||
@end /* PostgreSQL72Channel */
|
@end /* PostgreSQL72Channel */
|
||||||
|
|
||||||
@implementation PostgreSQL72Channel(PrimaryKeyGeneration)
|
@implementation PostgreSQL72Channel(PrimaryKeyGeneration)
|
||||||
|
Index: sope-gdl1/MySQL/MySQL4Channel.m
|
||||||
|
===================================================================
|
||||||
|
--- sope-gdl1/MySQL/MySQL4Channel.m (revision 1632)
|
||||||
|
+++ sope-gdl1/MySQL/MySQL4Channel.m (working copy)
|
||||||
|
@@ -755,6 +755,39 @@
|
||||||
|
return pkey;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* GCSEOAdaptorChannel protocol */
|
||||||
|
+static NSString *sqlFolderFormat = (@"CREATE TABLE %@ (\n" \
|
||||||
|
+ @" c_name VARCHAR (256) NOT NULL PRIMARY KEY,\n"
|
||||||
|
+ @" c_content VARCHAR (100000) NOT NULL,\n"
|
||||||
|
+ @" c_creationdate INT NOT NULL,\n"
|
||||||
|
+ @" c_lastmodified INT NOT NULL,\n"
|
||||||
|
+ @" c_version INT NOT NULL,\n"
|
||||||
|
+ @" c_deleted INT NULL\n"
|
||||||
|
+ @")");
|
||||||
|
+static NSString *sqlFolderACLFormat = (@"CREATE TABLE %@ (\n" \
|
||||||
|
+ @" c_uid VARCHAR (256) NOT NULL,\n"
|
||||||
|
+ @" c_object VARCHAR (256) NOT NULL,\n"
|
||||||
|
+ @" c_role VARCHAR (80) NOT NULL\n"
|
||||||
|
+ @")");
|
||||||
|
+
|
||||||
|
+- (NSException *) createGCSFolderTableWithName: (NSString *) tableName
|
||||||
|
+{
|
||||||
|
+ NSString *sql;
|
||||||
|
+
|
||||||
|
+ sql = [NSString stringWithFormat: sqlFolderFormat, tableName];
|
||||||
|
+
|
||||||
|
+ return [self evaluateExpressionX: sql];
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+- (NSException *) createGCSFolderACLTableWithName: (NSString *) tableName
|
||||||
|
+{
|
||||||
|
+ NSString *sql;
|
||||||
|
+
|
||||||
|
+ sql = [NSString stringWithFormat: sqlFolderACLFormat, tableName];
|
||||||
|
+
|
||||||
|
+ return [self evaluateExpressionX: sql];
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
@end /* MySQL4Channel */
|
||||||
|
|
||||||
|
void __link_MySQL4Channel() {
|
||||||
|
Index: sope-gdl1/GDLAccess/EOAdaptor.m
|
||||||
|
===================================================================
|
||||||
|
--- sope-gdl1/GDLAccess/EOAdaptor.m (revision 1632)
|
||||||
|
+++ sope-gdl1/GDLAccess/EOAdaptor.m (working copy)
|
||||||
|
@@ -202,6 +202,7 @@
|
||||||
|
if ([_scheme isEqualToString:@"sybase"]) return @"Sybase10";
|
||||||
|
if ([_scheme isEqualToString:@"sqlite"]) return @"SQLite3";
|
||||||
|
if ([_scheme isEqualToString:@"oracle"]) return @"Oracle8";
|
||||||
|
+ if ([_scheme isEqualToString:@"mysql"]) return @"MySQL";
|
||||||
|
|
||||||
|
if ([_scheme isEqualToString:@"http"]) {
|
||||||
|
NSLog(@"WARNING(%s): asked for 'http' URL, "
|
||||||
Index: sope-gdl1/Oracle8/OracleAdaptorChannel.m
|
Index: sope-gdl1/Oracle8/OracleAdaptorChannel.m
|
||||||
===================================================================
|
===================================================================
|
||||||
--- sope-gdl1/Oracle8/OracleAdaptorChannel.m (revision 1632)
|
--- sope-gdl1/Oracle8/OracleAdaptorChannel.m (revision 1632)
|
||||||
|
|
|
@ -388,6 +388,13 @@ static BOOL showTextAttachmentsInline = NO;
|
||||||
message = [self mimeMessageAsData];
|
message = [self mimeMessageAsData];
|
||||||
|
|
||||||
client = [[self imap4Connection] client];
|
client = [[self imap4Connection] client];
|
||||||
|
|
||||||
|
if (![imap4 doesMailboxExistAtURL: [container imap4URL]])
|
||||||
|
{
|
||||||
|
[client create: [container relativeImap4Name]];
|
||||||
|
[imap4 flushFolderHierarchyCache];
|
||||||
|
}
|
||||||
|
|
||||||
folder = [imap4 imap4FolderNameForURL: [container imap4URL]];
|
folder = [imap4 imap4FolderNameForURL: [container imap4URL]];
|
||||||
result
|
result
|
||||||
= [client append: message toFolder: folder
|
= [client append: message toFolder: folder
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||||
|
Copyright (C) 2007-2009 Inverse inc.
|
||||||
|
|
||||||
This file is part of OpenGroupware.org.
|
This file is part of SOGo.
|
||||||
|
|
||||||
OGo is free software; you can redistribute it and/or modify it under
|
SOGo is free software; you can redistribute it and/or modify it under
|
||||||
the terms of the GNU Lesser General Public License as published by the
|
the terms of the GNU Lesser General Public License as published by the
|
||||||
Free Software Foundation; either version 2, or (at your option) any
|
Free Software Foundation; either version 2, or (at your option) any
|
||||||
later version.
|
later version.
|
||||||
|
|
||||||
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||||
License for more details.
|
License for more details.
|
||||||
|
@ -338,8 +339,6 @@ static NSString *fallbackIMAP4Server = nil;
|
||||||
else if ([folderName
|
else if ([folderName
|
||||||
isEqualToString: [self trashFolderNameInContext: _ctx]])
|
isEqualToString: [self trashFolderNameInContext: _ctx]])
|
||||||
klazz = [SOGoTrashFolder class];
|
klazz = [SOGoTrashFolder class];
|
||||||
/* else if ([folderName isEqualToString: [self sieveFolderNameInContext: _ctx]])
|
|
||||||
obj = [self lookupFiltersFolder: _key inContext: _ctx]; */
|
|
||||||
else
|
else
|
||||||
klazz = [SOGoMailFolder class];
|
klazz = [SOGoMailFolder class];
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,18 @@ static NSString *spoolFolder = nil;
|
||||||
client = [[self imap4Connection] client];
|
client = [[self imap4Connection] client];
|
||||||
[imap4 selectFolder: [self imap4URL]];
|
[imap4 selectFolder: [self imap4URL]];
|
||||||
folderName = [imap4 imap4FolderNameForURL: [trashFolder imap4URL]];
|
folderName = [imap4 imap4FolderNameForURL: [trashFolder imap4URL]];
|
||||||
result = [client copyUids: uids toFolder: folderName];
|
|
||||||
|
// If our Trash folder doesn't exist when we try to copy messages
|
||||||
|
// to it, we create it.
|
||||||
|
result = [[client status: folderName flags: [NSArray arrayWithObject: @"UIDVALIDITY"]]
|
||||||
|
objectForKey: @"result"];
|
||||||
|
|
||||||
|
if (![result boolValue])
|
||||||
|
result = [[self imap4Connection] createMailbox: folderName atURL: [[self mailAccountFolder] imap4URL]];
|
||||||
|
|
||||||
|
if (!result || [result boolValue])
|
||||||
|
result = [client copyUids: uids toFolder: folderName];
|
||||||
|
|
||||||
if ([[result valueForKey: @"result"] boolValue])
|
if ([[result valueForKey: @"result"] boolValue])
|
||||||
{
|
{
|
||||||
result = [client storeFlags: [NSArray arrayWithObject: @"Deleted"]
|
result = [client storeFlags: [NSArray arrayWithObject: @"Deleted"]
|
||||||
|
@ -423,7 +434,15 @@ static NSString *spoolFolder = nil;
|
||||||
client = [[self imap4Connection] client];
|
client = [[self imap4Connection] client];
|
||||||
[imap4 selectFolder: [self imap4URL]];
|
[imap4 selectFolder: [self imap4URL]];
|
||||||
|
|
||||||
result = [client copyUids: uids toFolder: imapDestinationFolder];
|
// We make sure the destination IMAP folder exist, if not, we create it.
|
||||||
|
result = [[client status: imapDestinationFolder flags: [NSArray arrayWithObject: @"UIDVALIDITY"]]
|
||||||
|
objectForKey: @"result"];
|
||||||
|
|
||||||
|
if (![result boolValue])
|
||||||
|
result = [[self imap4Connection] createMailbox: imapDestinationFolder atURL: [[self mailAccountFolder] imap4URL]];
|
||||||
|
|
||||||
|
if (!result || [result boolValue])
|
||||||
|
result = [client copyUids: uids toFolder: imapDestinationFolder];
|
||||||
|
|
||||||
if ([[result valueForKey: @"result"] boolValue])
|
if ([[result valueForKey: @"result"] boolValue])
|
||||||
result = nil;
|
result = nil;
|
||||||
|
@ -475,8 +494,15 @@ static NSString *spoolFolder = nil;
|
||||||
- (NSException *) postData: (NSData *) _data
|
- (NSException *) postData: (NSData *) _data
|
||||||
flags: (id) _flags
|
flags: (id) _flags
|
||||||
{
|
{
|
||||||
return [[self imap4Connection] postData: _data flags: _flags
|
// We check for the existence of the IMAP folder (likely to be the
|
||||||
toFolderURL: [self imap4URL]];
|
// Sent mailbox) prior to appending messages to it.
|
||||||
|
if ([[self imap4Connection] doesMailboxExistAtURL: [self imap4URL]] ||
|
||||||
|
![[self imap4Connection] createMailbox: [self relativeImap4Name] atURL: [[self mailAccountFolder] imap4URL]])
|
||||||
|
return [[self imap4Connection] postData: _data flags: _flags
|
||||||
|
toFolderURL: [self imap4URL]];
|
||||||
|
|
||||||
|
return [NSException exceptionWithHTTPStatus: 502 /* Bad Gateway */
|
||||||
|
reason: [NSString stringWithFormat: @"%@ is not an IMAP4 folder", [self relativeImap4Name]]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSException *) expunge
|
- (NSException *) expunge
|
||||||
|
@ -577,7 +603,12 @@ static NSString *spoolFolder = nil;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ([[self imap4Connection] doesMailboxExistAtURL: [self imap4URL]])
|
// We automatically create mailboxes that don't exist but that we're
|
||||||
|
// trying to open. This shouldn't happen unless a mailbox has been
|
||||||
|
// deleted "behind our back" or if we're trying to open a special
|
||||||
|
// mailbox that doesn't yet exist.
|
||||||
|
if ([[self imap4Connection] doesMailboxExistAtURL: [self imap4URL]] ||
|
||||||
|
![[self imap4Connection] createMailbox: [self relativeImap4Name] atURL: [[self mailAccountFolder] imap4URL]])
|
||||||
{
|
{
|
||||||
if (isdigit ([_key characterAtIndex: 0]))
|
if (isdigit ([_key characterAtIndex: 0]))
|
||||||
obj = [SOGoMailObject objectWithName: _key inContainer: self];
|
obj = [SOGoMailObject objectWithName: _key inContainer: self];
|
||||||
|
@ -1069,20 +1100,6 @@ static NSString *spoolFolder = nil;
|
||||||
|
|
||||||
@implementation SOGoSpecialMailFolder
|
@implementation SOGoSpecialMailFolder
|
||||||
|
|
||||||
- (id) initWithName: (NSString *) newName
|
|
||||||
inContainer: (id) newContainer
|
|
||||||
{
|
|
||||||
if ((self = [super initWithName: newName
|
|
||||||
inContainer: newContainer]))
|
|
||||||
{
|
|
||||||
if (![[self imap4Connection] doesMailboxExistAtURL: [self imap4URL]])
|
|
||||||
[imap4 createMailbox: [self relativeImap4Name]
|
|
||||||
atURL: [newContainer imap4URL]];
|
|
||||||
}
|
|
||||||
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL) isSpecialFolder
|
- (BOOL) isSpecialFolder
|
||||||
{
|
{
|
||||||
return YES;
|
return YES;
|
||||||
|
|
|
@ -71,7 +71,7 @@ var SOGoDragHandlesInterface = {
|
||||||
this.origY = this.offsetTop;
|
this.origY = this.offsetTop;
|
||||||
this.origUpper = this.upperBlock.offsetHeight;
|
this.origUpper = this.upperBlock.offsetHeight;
|
||||||
var pointY = Event.pointerY(event);
|
var pointY = Event.pointerY(event);
|
||||||
if (pointY <= this.topMargin) this.delta = this.topMargin;
|
if (pointY < this.topMargin) this.delta = this.topMargin;
|
||||||
else this.delta = pointY - this.offsetTop - 5;
|
else this.delta = pointY - this.offsetTop - 5;
|
||||||
this.origLower = this.lowerBlock.offsetTop - 5;
|
this.origLower = this.lowerBlock.offsetTop - 5;
|
||||||
document.body.setStyle({ cursor: "n-resize" });
|
document.body.setStyle({ cursor: "n-resize" });
|
||||||
|
|
Loading…
Reference in a new issue