diff --git a/ChangeLog b/ChangeLog index b596344a6..ab7cd08a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-08-11 Wolfgang Sourdeau + * SoObjects/SOGo/WORequest+SOGo.m (-isAddressBookApp): new + (hackish) test method to determine whether the client is Apple's + AddressBook.app. + * UI/Common/UIxPageFrame.m (_dictionaryWithKeys:fromSource:): set an NSNull as value for keys which return no results, in order to avoid an NSInvalidArgumentException. diff --git a/SoObjects/SOGo/WORequest+SOGo.h b/SoObjects/SOGo/WORequest+SOGo.h index 415c3dbb4..f5b775e90 100644 --- a/SoObjects/SOGo/WORequest+SOGo.h +++ b/SoObjects/SOGo/WORequest+SOGo.h @@ -34,6 +34,7 @@ - (BOOL) isIPhone; - (BOOL) isICal; - (BOOL) isICal4; +- (BOOL) isAddressBookApp; @end diff --git a/SoObjects/SOGo/WORequest+SOGo.m b/SoObjects/SOGo/WORequest+SOGo.m index c1c0d042a..744a4802b 100644 --- a/SoObjects/SOGo/WORequest+SOGo.m +++ b/SoObjects/SOGo/WORequest+SOGo.m @@ -137,4 +137,14 @@ return [self isAppleDAVWithSubstring: @"iCal/4."]; } +- (BOOL) isAddressBookApp +{ + WEClientCapabilities *cc; + + cc = [self clientCapabilities]; + + return ([[cc userAgent] rangeOfString: @"CFNetwork"].location != NSNotFound + && [[cc userAgent] rangeOfString: @"Darwin"].location != NSNotFound); +} + @end