From 5b7136db24cbe4e525bed324dbc7ff3b7bf81dc7 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 10 Sep 2007 21:40:39 +0000 Subject: [PATCH] Monotone-Parent: 279fca526b178f040bcbf469c4a1b60370cae7d9 Monotone-Revision: 3dee1ff445f5268ef4c0f3c4ce1e664d14c8dc7c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-10T21:40:39 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ UI/Contacts/UIxContactFoldersView.m | 18 +++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index c86e7a592..6cf4ed546 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-09-10 Wolfgang Sourdeau + * UI/Contacts/UIxContactFoldersView.m ([UIxContactFoldersView + -contactSearchAction]): only return the records which have an + email set. + * SoObjects/Mailer/SOGoMailObject.m ([SOGoMailObject -trashInContext:_ctx]): no longer expunge the mailbox after marking a message deleted. diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index ed6dcd9d4..1509f4a52 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -139,25 +139,29 @@ { WOResponse *response; NSEnumerator *contacts; - NSString *responseString; + NSString *responseString, *email; NSDictionary *contact; response = [context response]; if ([results count] > 0) { + [response setStatus: 200]; contacts = [results objectEnumerator]; contact = [contacts nextObject]; if (contact) { - responseString = [NSString stringWithFormat: @"%@:%@:%@", - [contact objectForKey: @"c_uid"], - [contact objectForKey: @"cn"], - [contact objectForKey: @"c_email"]]; - [response setStatus: 200]; + email = [contact objectForKey: @"c_email"]; + if ([email length]) + { + responseString = [NSString stringWithFormat: @"%@:%@:%@", + [contact objectForKey: @"c_uid"], + [contact objectForKey: @"cn"], + email]; // [response setHeader: @"text/plain; charset=iso-8859-1" // forKey: @"Content-Type"]; - [response appendContentString: responseString]; + [response appendContentString: responseString]; + } // contact = [contacts nextObject]; } }