Fixed MailDAV support

Monotone-Parent: 1408266cca94d58c7a555af2e7697e3db2b49cf0
Monotone-Revision: 2b4b283c7442a1f2231c8b06c202bee21abeb77e

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2009-09-28T21:42:11
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
C Robert
2009-09-28 21:42:11 +00:00
parent 2738e102d5
commit 6b85a35298
5 changed files with 33 additions and 3 deletions
+6
View File
@@ -4,6 +4,12 @@
* SoObjects/Appointments/SOGoAptMailICalReply.m: Added Spanish definition.
* SoObjects/Appointments/SOGoAptMailDeletion.m: Added Spanish definition.
* SoObjects/Appointments/SOGoAptMailUpdate.m: Added Spanish definition.
* SoObjects/SOGo/NSString+Utilities.m (stringByEscapingURLPart): Added to
fix the URL parts for MailDAV
* SoObjects/Mailer/SOGoMailAccount.m (toManyRelationshipKeys): Added the
"folder" prefix for MailDAV compatibility.
* SoObjects/SOGo/SOGoObject.m (_urlPreferringParticle:): Fixed URL escaping
to make paths work in MailDAV.
2009-09-28 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+1 -1
View File
@@ -185,7 +185,7 @@ static NSString *fallbackIMAP4Server = nil;
[folders addObjectsFromArray: additionalFolders];
}
return folders;
return [folders stringsWithFormat: @"folder%@"];
}
- (BOOL) supportsQuotas
+2
View File
@@ -44,6 +44,8 @@
- (NSString *) doubleQuotedString;
- (NSString *) stringByEscapingURLPart;
- (NSString *) jsonRepresentation;
- (NSString *) asCSSIdentifier;
+13
View File
@@ -304,6 +304,19 @@ static NSMutableCharacterSet *urlStartChars = nil;
return [self doubleQuotedString];
}
- (NSString *) stringByEscapingURLPart
{
NSString *rc;
rc = [self stringByUnescapingURL];
rc = [rc stringByReplacingString: @"@"
withString: @"%40"];
rc = [rc stringByReplacingString: @" "
withString: @"%20"];
return rc;
}
- (NSString *) asCSSIdentifier
{
NSMutableString *cssIdentifier;
+11 -2
View File
@@ -1143,11 +1143,12 @@ SEL SOGoSelectorForPropertySetter (NSString *property)
{
NSURL *serverURL, *url;
NSMutableArray *path;
NSString *baseURL, *urlMethod, *fullHost;
NSString *baseURL, *urlMethod, *fullHost, *part;
NSNumber *port;
int count, max;
serverURL = [context serverURL];
baseURL = [[self baseURLInContext: context] stringByUnescapingURL];
baseURL = [self baseURLInContext: context];
path = [NSMutableArray arrayWithArray: [baseURL componentsSeparatedByString:
@"/"]];
if ([baseURL hasPrefix: @"http"])
@@ -1165,6 +1166,14 @@ SEL SOGoSelectorForPropertySetter (NSString *property)
[path insertObject: expected atIndex: 2];
}
max = [path count];
for (count = 3; count < max; count++)
{
part = [path objectAtIndex: count];
[path replaceObjectAtIndex: count
withObject: [part stringByEscapingURLPart]];
}
port = [serverURL port];
if (port)
fullHost = [NSString stringWithFormat: @"%@:%@",