(feat) applied all changes as a patch coming from PR #180

This commit is contained in:
Ludovic Marcotte
2015-12-30 09:22:08 -05:00
parent d05fd407bd
commit ae6ed0c055
55 changed files with 2397 additions and 1243 deletions
+13 -8
View File
@@ -166,9 +166,10 @@
ldifEntry = [childRecords objectForKey: objectName];
if (!ldifEntry)
{
ldifEntry = [source lookupContactEntry: objectName];
if (ldifEntry)
[childRecords setObject: ldifEntry forKey: objectName];
ldifEntry = [source lookupContactEntry: objectName
inDomain: [[context activeUser] domain]];
if (ldifEntry)
[childRecords setObject: ldifEntry forKey: objectName];
else if ([self isValidContentName: objectName])
{
url = [[[lookupContext request] uri] urlWithoutParameters];
@@ -373,10 +374,14 @@
NSDictionary *record;
if (aName && [aName length] > 0)
record = [self _flattenedRecord: [source lookupContactEntry: aName]];
{
record = [source lookupContactEntry: aName
inDomain: [[context activeUser] domain]];
record = [self _flattenedRecord: record];
}
else
record = nil;
return record;
}
@@ -611,7 +616,7 @@
toResponse: (WOResponse *) response
{
NSObject <DOMElement> *element;
NSString *url, *baseURL, *cname;
NSString *url, *baseURL, *cname, *domain;
NSString **propertiesArray;
NSMutableString *buffer;
NSDictionary *object;
@@ -628,13 +633,13 @@
max = [refs length];
buffer = [NSMutableString stringWithCapacity: max*512];
domain = [[context activeUser] domain];
for (count = 0; count < max; count++)
{
element = [refs objectAtIndex: count];
url = [[[element firstChild] nodeValue] stringByUnescapingURL];
cname = [self _deduceObjectNameFromURL: url fromBaseURL: baseURL];
object = [source lookupContactEntry: cname];
object = [source lookupContactEntry: cname inDomain: domain];
if (object)
[self appendObject: object
properties: propertiesArray