Applied patch from #2807
parent
6b6ec8a2ae
commit
3f8bbe8c60
|
@ -40,6 +40,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#import <Contacts/NGVCard+SOGo.h>
|
||||
|
||||
#import <SOGo/NSString+Utilities.h>
|
||||
|
||||
#include "NSDate+ActiveSync.h"
|
||||
#include "NSString+ActiveSync.h"
|
||||
|
||||
|
@ -199,6 +201,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
[s appendFormat: @"<Data>%@</Data>", o];
|
||||
[s appendString: @"</Body>"];
|
||||
}
|
||||
|
||||
if ((o = [self photo]))
|
||||
[s appendFormat: @"<Picture xmlns=\"Contacts:\">%@</Picture>", o];
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -285,13 +290,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
if ((o = [theValues objectForKey: @"Email1Address"]))
|
||||
{
|
||||
element = [self elementWithTag: @"email" ofType: @"work"];
|
||||
[element setSingleValue: o forKey: @""];
|
||||
[element setSingleValue: [o pureEMailAddress] forKey: @""];
|
||||
}
|
||||
|
||||
if ((o = [theValues objectForKey: @"Email2Address"]))
|
||||
{
|
||||
element = [self elementWithTag: @"email" ofType: @"home"];
|
||||
[element setSingleValue: o forKey: @""];
|
||||
[element setSingleValue: [o pureEMailAddress] forKey: @""];
|
||||
}
|
||||
|
||||
// SOGo currently only supports 2 email addresses ... but AS clients might send 3
|
||||
|
@ -299,7 +304,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
if ((o = [theValues objectForKey: @"Email3Address"]))
|
||||
{
|
||||
element = [self elementWithTag: @"email" ofType: @"three"];
|
||||
[element setSingleValue: o forKey: @""];
|
||||
[element setSingleValue: [o pureEMailAddress] forKey: @""];
|
||||
}
|
||||
|
||||
// Formatted name
|
||||
|
@ -346,6 +351,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
if ((o = [theValues objectForKey: @"NickName"]))
|
||||
[self setNickname: o];
|
||||
|
||||
if ((o = [theValues objectForKey: @"Picture"]))
|
||||
[self setPhoto: o];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
9
NEWS
9
NEWS
|
@ -1,3 +1,12 @@
|
|||
2.2.6 (2014-XX-YY)
|
||||
------------------
|
||||
|
||||
Enhancements
|
||||
- contacts photos are now synchronized using ActiveSync (#2807)
|
||||
|
||||
Bug fixes
|
||||
|
||||
|
||||
2.2.5 (2014-06-05)
|
||||
------------------
|
||||
|
||||
|
|
|
@ -126,6 +126,9 @@ typedef enum
|
|||
|
||||
- (void) setCategories: (NSArray *) newCategories;
|
||||
- (NSArray *) categories;
|
||||
- (NSString *) photo;
|
||||
- (void) setPhoto: (NSString *) _value;
|
||||
|
||||
|
||||
// - (void) setN: (NGVCardName *) _v;
|
||||
// - (NGVCardName *) n;
|
||||
|
|
|
@ -288,6 +288,25 @@
|
|||
return [self uniqueChildWithTag: @"n"];
|
||||
}
|
||||
|
||||
- (NSString *) photo
|
||||
{
|
||||
NGVCardPhoto *photo;
|
||||
|
||||
photo = (NGVCardPhoto *)[self uniqueChildWithTag: @"photo"];
|
||||
|
||||
return [[photo valuesAtIndex: 0 forKey: @""] objectAtIndex: 0];
|
||||
}
|
||||
|
||||
- (void) setPhoto: (NSString *) _value
|
||||
{
|
||||
CardElement *photo;
|
||||
photo = [self uniqueChildWithTag: @"photo"];
|
||||
[photo setValue: 0 ofAttribute: @"encoding" to: @"BASE64"];
|
||||
|
||||
[photo setSingleValue: _value forKey: @""];
|
||||
}
|
||||
|
||||
|
||||
- (void) setOrg: (NSString *) anOrg
|
||||
units: (NSArray *) someUnits
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue