Monotone-Parent: f0542255e31c3d8ac8c2d9b48083294de7e0308c

Monotone-Revision: 06def9332cbc52ec43917206f7800e487623419f

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-02-09T21:16:36
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2009-02-09 21:16:36 +00:00
parent ba0c3d7e04
commit 9dcdca57cd
2 changed files with 31 additions and 21 deletions

View File

@@ -1,3 +1,10 @@
2009-02-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Contacts/SOGoContactLDAPFolder.m
([SOGoContactLDAPFolder
-appendObject:objectwithBaseURL:baseURLtoREPORTResponse:r]): don't
lookup the returned object if its c_name has no length.
2009-02-06 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Appointments/SOGoAppointmentFolder.m

View File

@@ -57,29 +57,32 @@
NSString *name, *etagLine, *contactString;
name = [object objectForKey: @"c_name"];
component = [self lookupName: name inContext: context acquire: NO];
if ([name length])
{
component = [self lookupName: name inContext: context acquire: NO];
[r appendContentString: @" <D:response>\r\n"];
[r appendContentString: @" <D:href>"];
[r appendContentString: baseURL];
if (![baseURL hasSuffix: @"/"])
[r appendContentString: @"/"];
[r appendContentString: name];
[r appendContentString: @"</D:href>\r\n"];
[r appendContentString: @" <D:response>\r\n"];
[r appendContentString: @" <D:href>"];
[r appendContentString: baseURL];
if (![baseURL hasSuffix: @"/"])
[r appendContentString: @"/"];
[r appendContentString: name];
[r appendContentString: @"</D:href>\r\n"];
[r appendContentString: @" <D:propstat>\r\n"];
[r appendContentString: @" <D:prop>\r\n"];
etagLine = [NSString stringWithFormat: @" <D:getetag>%@</D:getetag>\r\n",
[component davEntityTag]];
[r appendContentString: etagLine];
[r appendContentString: @" </D:prop>\r\n"];
[r appendContentString: @" <D:status>HTTP/1.1 200 OK</D:status>\r\n"];
[r appendContentString: @" </D:propstat>\r\n"];
[r appendContentString: @" <C:addressbook-data>"];
contactString = [[component contentAsString] stringByEscapingXMLString];
[r appendContentString: contactString];
[r appendContentString: @"</C:addressbook-data>\r\n"];
[r appendContentString: @" </D:response>\r\n"];
[r appendContentString: @" <D:propstat>\r\n"];
[r appendContentString: @" <D:prop>\r\n"];
etagLine = [NSString stringWithFormat: @" <D:getetag>%@</D:getetag>\r\n",
[component davEntityTag]];
[r appendContentString: etagLine];
[r appendContentString: @" </D:prop>\r\n"];
[r appendContentString: @" <D:status>HTTP/1.1 200 OK</D:status>\r\n"];
[r appendContentString: @" </D:propstat>\r\n"];
[r appendContentString: @" <C:addressbook-data>"];
contactString = [[component contentAsString] stringByEscapingXMLString];
[r appendContentString: contactString];
[r appendContentString: @"</C:addressbook-data>\r\n"];
[r appendContentString: @" </D:response>\r\n"];
}
}
+ (id) folderWithName: (NSString *) aName