From f93e9b5b9d3bb147b01026a7c8874ac0bad09edf Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 13 Feb 2012 14:50:00 +0000 Subject: [PATCH] Monotone-Parent: b2bfdd5b59fed2950707131eca171b4758bcd635 Monotone-Revision: 57b39725f8c002b9b6cb9b05ad3fa2e2401cd46b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-02-13T14:50:00 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 ++++ UI/Contacts/UIxContactView.m | 32 ++++++---------------- UI/Templates/ContactsUI/UIxContactView.wox | 5 ++-- 3 files changed, 16 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2071301ed..4335fab4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-13 Wolfgang Sourdeau + + * UI/Contacts/UIxContactView.m (-photoURL, -hasPhoto): copied code + from UIxContactEditor, thereby replacing "photosURL". + 2012-02-08 Francis Lachapelle * SoObjects/SOGo/SOGoGCSFolder.m (+webdavAclManager): must include diff --git a/UI/Contacts/UIxContactView.m b/UI/Contacts/UIxContactView.m index 3d3bf53c2..53fb24428 100644 --- a/UI/Contacts/UIxContactView.m +++ b/UI/Contacts/UIxContactView.m @@ -664,34 +664,18 @@ return self; } -- (NSArray *) photosURL +- (BOOL) hasPhoto +{ + return [[self clientObject] hasPhoto]; +} + +- (NSString *) photoURL { - NSArray *photoElements; NSURL *soURL; - NSString *baseInlineURL, *photoURL; - NGVCardPhoto *photo; - int count, max; - if (!photosURL) - { - soURL = [[self clientObject] soURL]; - baseInlineURL = [soURL absoluteString]; - photoElements = [card childrenWithTag: @"photo"]; - max = [photoElements count]; - photosURL = [[NSMutableArray alloc] initWithCapacity: max]; - for (count = 0; count < max; count++) - { - photo = [photoElements objectAtIndex: count]; - if ([photo isInline]) - photoURL = [NSString stringWithFormat: @"%@/photo%d", - baseInlineURL, count]; - else - photoURL = [photo flattenedValuesForKey: @""]; - [photosURL addObject: photoURL]; - } - } + soURL = [[self clientObject] soURL]; - return photosURL; + return [NSString stringWithFormat: @"%@/photo", [soURL absoluteString]]; } @end /* UIxContactView */ diff --git a/UI/Templates/ContactsUI/UIxContactView.wox b/UI/Templates/ContactsUI/UIxContactView.wox index 0da0abf72..98c6afdbe 100644 --- a/UI/Templates/ContactsUI/UIxContactView.wox +++ b/UI/Templates/ContactsUI/UIxContactView.wox @@ -19,8 +19,9 @@ />
+ />