mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-25 08:23:28 +00:00
iPhone + CalDAV fixed
Monotone-Parent: 3c522ae41fe50f5ebe60bb22d26f407dc4c942d4 Monotone-Revision: 0bc72fc660e8d843466e5428a65d7ea595d8f88e Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-07-20T18:20:44 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
- (BOOL) handledByDefaultHandler;
|
||||
- (NSDictionary *) davPatchedPropertiesWithTopTag: (NSString *) topTag;
|
||||
- (BOOL) isIPhone;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#import <NGObjWeb/SoObjectRequestHandler.h>
|
||||
#import <NGObjWeb/WOApplication.h>
|
||||
#import <NGObjWeb/WEClientCapabilities.h>
|
||||
|
||||
#import <DOM/DOMProtocols.h>
|
||||
|
||||
@@ -102,4 +103,22 @@
|
||||
return patchedProperties;
|
||||
}
|
||||
|
||||
- (BOOL) isIPhone
|
||||
{
|
||||
WEClientCapabilities *cc;
|
||||
BOOL rc;
|
||||
|
||||
rc = NO;
|
||||
cc = [self clientCapabilities];
|
||||
if ([[cc userAgentType] isEqualToString: @"AppleDAVAccess"])
|
||||
{
|
||||
NSRange r = [[cc userAgent] rangeOfString: @"iPhone"];
|
||||
if (r.location != NSNotFound)
|
||||
rc = YES;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user