mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-18 11:57:59 +00:00
Monotone-Parent: c46d8b7dd8119925eededd812de04ae71f5c1d6d
Monotone-Revision: e78fc689c78de581aaf34ccdcebebddeb142c5b3 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-08-12T14:02:21 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
#import <NGObjWeb/SoSelectorInvocation.h>
|
||||
#import <NGObjWeb/SoUser.h>
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
#import <EOControl/EOSortOrdering.h>
|
||||
#import <SaxObjC/XMLNamespaces.h>
|
||||
|
||||
@@ -50,49 +49,6 @@
|
||||
|
||||
@implementation SOGoContactSourceFolder
|
||||
|
||||
#warning this should be unified within SOGoFolder
|
||||
- (void) appendObject: (NSDictionary *) object
|
||||
withBaseURL: (NSString *) baseURL
|
||||
toREPORTResponse: (WOResponse *) r
|
||||
{
|
||||
SOGoContactLDIFEntry *component;
|
||||
NSString *name, *etagLine, *contactString;
|
||||
|
||||
name = [object objectForKey: @"c_name"];
|
||||
if ([name length])
|
||||
{
|
||||
component = [self lookupName: name inContext: context acquire: NO];
|
||||
|
||||
if ([component isKindOfClass: [NSException class]])
|
||||
{
|
||||
[self logWithFormat: @"Object with name '%@' not found. You likely have a LDAP configuration issue.", name];
|
||||
return;
|
||||
}
|
||||
|
||||
[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"];
|
||||
}
|
||||
}
|
||||
|
||||
+ (id) folderWithName: (NSString *) aName
|
||||
andDisplayName: (NSString *) aDisplayName
|
||||
inContainer: (id) aContainer
|
||||
|
||||
Reference in New Issue
Block a user