mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-02 17:09:44 +00:00
(feat) applied all changes as a patch coming from PR #180
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user