(fix) now correctly handle multiple email addresses in the GAL over EAS
parent
64da65d827
commit
619e9fe7dd
|
@ -2109,13 +2109,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
inResponse: (WOResponse *) theResponse
|
inResponse: (WOResponse *) theResponse
|
||||||
{
|
{
|
||||||
SOGoContactSourceFolder *currentFolder;
|
SOGoContactSourceFolder *currentFolder;
|
||||||
|
NSArray *allKeys, *allContacts, *mails;
|
||||||
NSDictionary *systemSources, *contact;
|
NSDictionary *systemSources, *contact;
|
||||||
|
NSString *name, *query, *current_mail;
|
||||||
SOGoContactFolders *contactFolders;
|
SOGoContactFolders *contactFolders;
|
||||||
NSArray *allKeys, *allContacts;
|
|
||||||
SOGoUserFolder *userFolder;
|
SOGoUserFolder *userFolder;
|
||||||
NSString *name, *query;
|
|
||||||
NSMutableString *s;
|
NSMutableString *s;
|
||||||
NSData *d;
|
NSData *d;
|
||||||
|
id o;
|
||||||
|
|
||||||
int i, j, total;
|
int i, j, total;
|
||||||
|
|
||||||
|
@ -2166,18 +2167,50 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
// We get the LDIF entry of our record, for easier processing
|
// We get the LDIF entry of our record, for easier processing
|
||||||
contact = [[currentFolder lookupName: [contact objectForKey: @"c_name"] inContext: context acquire: NO] ldifRecord];
|
contact = [[currentFolder lookupName: [contact objectForKey: @"c_name"] inContext: context acquire: NO] ldifRecord];
|
||||||
|
|
||||||
[s appendString: @"<Result xmlns=\"Search:\">"];
|
o = [contact objectForKey: @"mail"];
|
||||||
[s appendString: @"<Properties>"];
|
if ([o isKindOfClass: [NSArray class]])
|
||||||
[s appendFormat: @"<DisplayName xmlns=\"Gal:\">%@</DisplayName>", [contact objectForKey: @"displayname"]];
|
mails = o;
|
||||||
[s appendFormat: @"<FirstName xmlns=\"Gal:\">%@</FirstName>", [contact objectForKey: @"givenname"]];
|
else
|
||||||
[s appendFormat: @"<LastName xmlns=\"Gal:\">%@</LastName>", [contact objectForKey: @"sn"]];
|
mails = [NSArray arrayWithObjects: o ? o : @"", nil];
|
||||||
[s appendFormat: @"<EmailAddress xmlns=\"Gal:\">%@</EmailAddress>", [contact objectForKey: @"mail"]];
|
|
||||||
[s appendFormat: @"<Phone xmlns=\"Gal:\">%@</Phone>", [contact objectForKey: @"telephonenumber"]];
|
for (total = 0; total < [mails count]; total++)
|
||||||
[s appendFormat: @"<Company xmlns=\"Gal:\">%@</Company>", [contact objectForKey: @"o"]];
|
{
|
||||||
[s appendString: @"</Properties>"];
|
current_mail = [mails objectAtIndex: total];
|
||||||
[s appendString: @"</Result>"];
|
|
||||||
total++;
|
[s appendString: @"<Result xmlns=\"Search:\">"];
|
||||||
|
[s appendString: @"<Properties>"];
|
||||||
|
|
||||||
|
if ((o = [contact objectForKey: @"displayname"]))
|
||||||
|
[s appendFormat: @"<DisplayName xmlns=\"Gal:\">%@</DisplayName>", o];
|
||||||
|
|
||||||
|
if ((o = [contact objectForKey: @"title"]))
|
||||||
|
[s appendFormat: @"<Title xmlns=\"Gal:\">%@</Title>", o];
|
||||||
|
|
||||||
|
if ((o = [contact objectForKey: @"givenname"]))
|
||||||
|
[s appendFormat: @"<FirstName xmlns=\"Gal:\">%@</FirstName>", o];
|
||||||
|
|
||||||
|
if ((o = [contact objectForKey: @"sn"]))
|
||||||
|
[s appendFormat: @"<LastName xmlns=\"Gal:\">%@</LastName>", o];
|
||||||
|
|
||||||
|
if ([current_mail length] > 0)
|
||||||
|
[s appendFormat: @"<EmailAddress xmlns=\"Gal:\">%@</EmailAddress>", current_mail];
|
||||||
|
|
||||||
|
if ((o = [contact objectForKey: @"telephonenumber"]))
|
||||||
|
[s appendFormat: @"<Phone xmlns=\"Gal:\">%@</Phone>", o];
|
||||||
|
|
||||||
|
if ((o = [contact objectForKey: @"homephone"]))
|
||||||
|
[s appendFormat: @"<HomePhone xmlns=\"Gal:\">%@</HomePhone>", o];
|
||||||
|
|
||||||
|
if ((o = [contact objectForKey: @"mobile"]))
|
||||||
|
[s appendFormat: @"<MobilePhone xmlns=\"Gal:\">%@</MobilePhone>", o];
|
||||||
|
|
||||||
|
if ((o = [contact objectForKey: @"o"]))
|
||||||
|
[s appendFormat: @"<Company xmlns=\"Gal:\">%@</Company>", o];
|
||||||
|
|
||||||
|
[s appendString: @"</Properties>"];
|
||||||
|
[s appendString: @"</Result>"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
3
NEWS
3
NEWS
|
@ -47,7 +47,8 @@ Bug fixes
|
||||||
- optional attendes on events are now shown properly (Zentyal)
|
- optional attendes on events are now shown properly (Zentyal)
|
||||||
- fixed the EAS maximum response size being per-folder, and not global
|
- fixed the EAS maximum response size being per-folder, and not global
|
||||||
- now set MeetingMessageType only for EAS 14.1
|
- now set MeetingMessageType only for EAS 14.1
|
||||||
- now correct handle external invitations using EAS
|
- now correctly handle external invitations using EAS
|
||||||
|
- now correctly handle multiple email addresses in the GAL over EAS (#3102)
|
||||||
|
|
||||||
2.2.17a (2015-03-15)
|
2.2.17a (2015-03-15)
|
||||||
--------------------
|
--------------------
|
||||||
|
|
Loading…
Reference in New Issue