Fixed most build warnings
parent
dac021799a
commit
6d8c328910
|
@ -33,6 +33,7 @@
|
||||||
#import <GDLContentStore/GCSChannelManager.h>
|
#import <GDLContentStore/GCSChannelManager.h>
|
||||||
#import <GDLContentStore/GCSFolderManager.h>
|
#import <GDLContentStore/GCSFolderManager.h>
|
||||||
#import <GDLContentStore/GCSAlarmsFolder.h>
|
#import <GDLContentStore/GCSAlarmsFolder.h>
|
||||||
|
#import <GDLContentStore/GCSSessionsFolder.h>
|
||||||
|
|
||||||
#import <NGObjWeb/SoClassSecurityInfo.h>
|
#import <NGObjWeb/SoClassSecurityInfo.h>
|
||||||
#import <NGObjWeb/WOContext.h>
|
#import <NGObjWeb/WOContext.h>
|
||||||
|
|
|
@ -1481,7 +1481,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||||
[filter setObject: textMatch forKey: propName];
|
[filter setObject: textMatch forKey: propName];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDictionary *) _parseCalendarFilter: (DOMElement *) filterElement
|
- (NSDictionary *) _parseCalendarFilter: (id <DOMElement>) filterElement
|
||||||
{
|
{
|
||||||
NSMutableDictionary *filterData;
|
NSMutableDictionary *filterData;
|
||||||
id <DOMElement> parentNode;
|
id <DOMElement> parentNode;
|
||||||
|
@ -1536,10 +1536,10 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSArray *) _parseCalendarFilters: (DOMElement *) parentNode
|
- (NSArray *) _parseCalendarFilters: (id <DOMElement>) parentNode
|
||||||
{
|
{
|
||||||
id <DOMNodeList> children;
|
id <DOMNodeList> children;
|
||||||
DOMElement *element;
|
id <DOMElement>element;
|
||||||
NSMutableArray *filters;
|
NSMutableArray *filters;
|
||||||
NSDictionary *filter;
|
NSDictionary *filter;
|
||||||
unsigned int count, max;
|
unsigned int count, max;
|
||||||
|
@ -1794,7 +1794,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||||
{
|
{
|
||||||
WOResponse *r;
|
WOResponse *r;
|
||||||
id <DOMDocument> document;
|
id <DOMDocument> document;
|
||||||
DOMElement *documentElement, *propElement;
|
id <DOMElement> documentElement, propElement;
|
||||||
|
|
||||||
r = [context response];
|
r = [context response];
|
||||||
[r prepareDAVResponse];
|
[r prepareDAVResponse];
|
||||||
|
@ -1802,9 +1802,9 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||||
@" xmlns:C=\"urn:ietf:params:xml:ns:caldav\">"];
|
@" xmlns:C=\"urn:ietf:params:xml:ns:caldav\">"];
|
||||||
|
|
||||||
document = [[context request] contentAsDOMDocument];
|
document = [[context request] contentAsDOMDocument];
|
||||||
documentElement = (DOMElement *) [document documentElement];
|
documentElement = (id <DOMElement>) [document documentElement];
|
||||||
propElement = [documentElement firstElementWithTag: @"prop"
|
propElement = [(NGDOMNodeWithChildren *) documentElement
|
||||||
inNamespace: XMLNS_WEBDAV];
|
firstElementWithTag: @"prop" inNamespace: XMLNS_WEBDAV];
|
||||||
|
|
||||||
[self _appendComponentProperties: [self parseDAVRequestedProperties: propElement]
|
[self _appendComponentProperties: [self parseDAVRequestedProperties: propElement]
|
||||||
matchingFilters: [self _parseCalendarFilters: documentElement]
|
matchingFilters: [self _parseCalendarFilters: documentElement]
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#import <SOGo/SOGoParentFolder.h>
|
#import <SOGo/SOGoParentFolder.h>
|
||||||
#import <SOGo/SOGoPermissions.h>
|
#import <SOGo/SOGoPermissions.h>
|
||||||
#import <SOGo/SOGoUser.h>
|
#import <SOGo/SOGoUser.h>
|
||||||
|
#import <SOGo/SOGoUserDefaults.h>
|
||||||
#import <SOGo/SOGoUserSettings.h>
|
#import <SOGo/SOGoUserSettings.h>
|
||||||
#import <SOGo/SOGoWebDAVValue.h>
|
#import <SOGo/SOGoWebDAVValue.h>
|
||||||
#import <SOGo/SOGoWebDAVAclManager.h>
|
#import <SOGo/SOGoWebDAVAclManager.h>
|
||||||
|
|
|
@ -19,6 +19,10 @@
|
||||||
02111-1307, USA.
|
02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#import <Foundation/NSCharacterSet.h>
|
||||||
|
|
||||||
|
#import <NGObjWeb/WOResponse.h>
|
||||||
|
|
||||||
#import <SOGo/NSDictionary+Utilities.h>
|
#import <SOGo/NSDictionary+Utilities.h>
|
||||||
#import <SOGo/NSObject+Utilities.h>
|
#import <SOGo/NSObject+Utilities.h>
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,11 @@
|
||||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <Foundation/NSCharacterSet.h>
|
#import <Foundation/NSCharacterSet.h>
|
||||||
|
|
||||||
|
#import <NGObjWeb/WOResponse.h>
|
||||||
|
|
||||||
#import <SOGo/NSDictionary+Utilities.h>
|
#import <SOGo/NSDictionary+Utilities.h>
|
||||||
#import <SOGo/NSObject+Utilities.h>
|
#import <SOGo/NSObject+Utilities.h>
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,13 @@
|
||||||
02111-1307, USA.
|
02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <NGCards/iCalEvent.h>
|
#import <Foundation/NSCharacterSet.h>
|
||||||
|
|
||||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
|
#import <NGObjWeb/WOResponse.h>
|
||||||
|
|
||||||
|
#import <NGCards/iCalEvent.h>
|
||||||
|
|
||||||
#import <SOGo/NSDictionary+Utilities.h>
|
#import <SOGo/NSDictionary+Utilities.h>
|
||||||
#import <SOGo/NSObject+Utilities.h>
|
#import <SOGo/NSObject+Utilities.h>
|
||||||
#import <SOGo/SOGoUser.h>
|
#import <SOGo/SOGoUser.h>
|
||||||
|
|
|
@ -20,8 +20,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <Foundation/NSCalendarDate.h>
|
#import <Foundation/NSCalendarDate.h>
|
||||||
|
#import <Foundation/NSCharacterSet.h>
|
||||||
|
|
||||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
|
#import <NGObjWeb/WOResponse.h>
|
||||||
|
|
||||||
#import <NGCards/iCalEvent.h>
|
#import <NGCards/iCalEvent.h>
|
||||||
#import <NGCards/iCalEventChanges.h>
|
#import <NGCards/iCalEventChanges.h>
|
||||||
|
|
||||||
|
@ -59,7 +62,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) valueForProperty: (NSString *) property
|
- (NSString *) valueForProperty: (NSString *) property
|
||||||
withDateFormatter: (SOGoDateFormatter *) dateFormatter
|
withDateFormatter: (SOGoDateFormatter *) _dateFormatter
|
||||||
{
|
{
|
||||||
static NSDictionary *valueTypes = nil;
|
static NSDictionary *valueTypes = nil;
|
||||||
NSString *valueType;
|
NSString *valueType;
|
||||||
|
@ -86,9 +89,9 @@
|
||||||
{
|
{
|
||||||
[value setTimeZone: viewTZ];
|
[value setTimeZone: viewTZ];
|
||||||
if ([apt isAllDay])
|
if ([apt isAllDay])
|
||||||
value = [dateFormatter formattedDate: value];
|
value = [_dateFormatter formattedDate: value];
|
||||||
else
|
else
|
||||||
value = [dateFormatter formattedDateAndTime: value];
|
value = [_dateFormatter formattedDateAndTime: value];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -97,7 +100,7 @@
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) _setupBodyContentWithFormatter: (SOGoDateFormatter *) dateFormatter
|
- (void) _setupBodyContentWithFormatter: (SOGoDateFormatter *) _dateFormatter
|
||||||
{
|
{
|
||||||
NSString *property, *label, *value;
|
NSString *property, *label, *value;
|
||||||
NSArray *updatedProperties;
|
NSArray *updatedProperties;
|
||||||
|
@ -111,7 +114,7 @@
|
||||||
{
|
{
|
||||||
property = [updatedProperties objectAtIndex: count];
|
property = [updatedProperties objectAtIndex: count];
|
||||||
value = [self valueForProperty: property
|
value = [self valueForProperty: property
|
||||||
withDateFormatter: dateFormatter];
|
withDateFormatter: _dateFormatter];
|
||||||
/* Unhandled properties will return nil */
|
/* Unhandled properties will return nil */
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
|
@ -157,21 +160,21 @@
|
||||||
- (void) setupValues
|
- (void) setupValues
|
||||||
{
|
{
|
||||||
NSCalendarDate *date;
|
NSCalendarDate *date;
|
||||||
SOGoDateFormatter *dateFormatter;
|
SOGoDateFormatter *localDateFormatter;
|
||||||
|
|
||||||
[super setupValues];
|
[super setupValues];
|
||||||
|
|
||||||
dateFormatter = [[context activeUser] dateFormatterInContext: context];
|
localDateFormatter = [[context activeUser] dateFormatterInContext: context];
|
||||||
|
|
||||||
date = [self oldStartDate];
|
date = [self oldStartDate];
|
||||||
[values setObject: [dateFormatter shortFormattedDate: date]
|
[values setObject: [localDateFormatter shortFormattedDate: date]
|
||||||
forKey: @"OldStartDate"];
|
forKey: @"OldStartDate"];
|
||||||
|
|
||||||
if (![apt isAllDay])
|
if (![apt isAllDay])
|
||||||
[values setObject: [dateFormatter formattedTime: date]
|
[values setObject: [localDateFormatter formattedTime: date]
|
||||||
forKey: @"OldStartTime"];
|
forKey: @"OldStartTime"];
|
||||||
|
|
||||||
[self _setupBodyContentWithFormatter: dateFormatter];
|
[self _setupBodyContentWithFormatter: localDateFormatter];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) getSubject
|
- (NSString *) getSubject
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#import <SaxObjC/XMLNamespaces.h>
|
#import <SaxObjC/XMLNamespaces.h>
|
||||||
#import <SOGo/NSArray+Utilities.h>
|
#import <SOGo/NSArray+Utilities.h>
|
||||||
#import <SOGo/SOGoUser.h>
|
#import <SOGo/SOGoUser.h>
|
||||||
|
#import <SOGo/SOGoUserFolder.h>
|
||||||
#import <SOGo/SOGoUserSettings.h>
|
#import <SOGo/SOGoUserSettings.h>
|
||||||
|
|
||||||
#import <SOGo/NSObject+DAV.h>
|
#import <SOGo/NSObject+DAV.h>
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#import <NGCards/iCalCalendar.h>
|
#import <NGCards/iCalCalendar.h>
|
||||||
#import <NGCards/iCalDateTime.h>
|
#import <NGCards/iCalDateTime.h>
|
||||||
|
#import <NGCards/iCalEvent.h>
|
||||||
#import <NGCards/iCalTimeZone.h>
|
#import <NGCards/iCalTimeZone.h>
|
||||||
#import <NGCards/iCalRepeatableEntityObject.h>
|
#import <NGCards/iCalRepeatableEntityObject.h>
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#import <SOGo/NSObject+DAV.h>
|
#import <SOGo/NSObject+DAV.h>
|
||||||
#import <SOGo/NSString+DAV.h>
|
#import <SOGo/NSString+DAV.h>
|
||||||
#import <SOGo/NSObject+Utilities.h>
|
#import <SOGo/NSObject+Utilities.h>
|
||||||
|
#import <SOGo/SOGoDomainDefaults.h>
|
||||||
#import <SOGo/SOGoGCSFolder.h>
|
#import <SOGo/SOGoGCSFolder.h>
|
||||||
#import <SOGo/SOGoUser.h>
|
#import <SOGo/SOGoUser.h>
|
||||||
#import <SOGo/SOGoUserSettings.h>
|
#import <SOGo/SOGoUserSettings.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* iCalCalendar+SOGo.m - this file is part of $PROJECT_NAME_HERE$
|
/* iCalCalendar+SOGo.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Inverse inc
|
* Copyright (C) 2012 Inverse inc
|
||||||
*
|
*
|
||||||
|
@ -21,6 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <Foundation/NSArray.h>
|
#import <Foundation/NSArray.h>
|
||||||
|
#import <Foundation/NSCalendarDate.h>
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
|
|
||||||
#import <NGCards/iCalRepeatableEntityObject.h>
|
#import <NGCards/iCalRepeatableEntityObject.h>
|
||||||
|
|
|
@ -21,9 +21,11 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#import <Foundation/NSDictionary.h>
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
#import <SOGo/SOGoUserManager.h>
|
|
||||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
|
#import <SOGo/SOGoUser.h>
|
||||||
|
#import <SOGo/SOGoUserManager.h>
|
||||||
|
|
||||||
#import "iCalPerson+SOGo.h"
|
#import "iCalPerson+SOGo.h"
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <Foundation/NSArray.h>
|
#import <Foundation/NSArray.h>
|
||||||
|
#import <Foundation/NSData.h>
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
|
|
||||||
#import <NGObjWeb/WOContext.h>
|
#import <NGObjWeb/WOContext.h>
|
||||||
|
|
|
@ -311,7 +311,7 @@
|
||||||
{
|
{
|
||||||
SOGoUser *ownerUser;
|
SOGoUser *ownerUser;
|
||||||
NSMutableArray *categories;
|
NSMutableArray *categories;
|
||||||
DOMElement *documentElement, *catNode;
|
id <DOMElement> documentElement, catNode;
|
||||||
id <DOMDocument> document;
|
id <DOMDocument> document;
|
||||||
id <DOMNodeList> catNodes;
|
id <DOMNodeList> catNodes;
|
||||||
NSUInteger count, max;
|
NSUInteger count, max;
|
||||||
|
@ -322,14 +322,14 @@
|
||||||
if ([newCategories length] > 0)
|
if ([newCategories length] > 0)
|
||||||
{
|
{
|
||||||
document = [[context request] contentAsDOMDocument];
|
document = [[context request] contentAsDOMDocument];
|
||||||
documentElement = (DOMElement *) [document documentElement];
|
documentElement = [document documentElement];
|
||||||
catNodes = [documentElement getElementsByTagName: @"category"];
|
catNodes = [documentElement getElementsByTagName: @"category"];
|
||||||
max = [catNodes length];
|
max = [catNodes length];
|
||||||
for (count = 0; count < max; count++)
|
for (count = 0; count < max; count++)
|
||||||
{
|
{
|
||||||
catNode = [catNodes objectAtIndex: count];
|
catNode = [catNodes objectAtIndex: count];
|
||||||
if ([catNode hasChildNodes])
|
if ([catNode hasChildNodes])
|
||||||
[categories addObject: [catNode textValue]];
|
[categories addObject: [(NGDOMNode *) catNode textValue]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -598,7 +598,7 @@
|
||||||
{
|
{
|
||||||
WOResponse *r;
|
WOResponse *r;
|
||||||
id <DOMDocument> document;
|
id <DOMDocument> document;
|
||||||
DOMElement *documentElement, *propElement;
|
id <DOMElement> documentElement, propElement;
|
||||||
|
|
||||||
r = [context response];
|
r = [context response];
|
||||||
[r prepareDAVResponse];
|
[r prepareDAVResponse];
|
||||||
|
@ -606,10 +606,11 @@
|
||||||
[NSString stringWithFormat: @"<D:multistatus xmlns:D=\"DAV:\""
|
[NSString stringWithFormat: @"<D:multistatus xmlns:D=\"DAV:\""
|
||||||
@" xmlns:C=\"%@\">", namespace]];
|
@" xmlns:C=\"%@\">", namespace]];
|
||||||
document = [[queryContext request] contentAsDOMDocument];
|
document = [[queryContext request] contentAsDOMDocument];
|
||||||
documentElement = (DOMElement *) [document documentElement];
|
documentElement = [document documentElement];
|
||||||
propElement = [documentElement firstElementWithTag: @"prop"
|
propElement = [(NGDOMNodeWithChildren *) documentElement
|
||||||
|
firstElementWithTag: @"prop"
|
||||||
inNamespace: @"DAV:"];
|
inNamespace: @"DAV:"];
|
||||||
[self _appendComponentProperties: [propElement flatPropertyNameOfSubElements]
|
[self _appendComponentProperties: [(NGDOMNodeWithChildren *) propElement flatPropertyNameOfSubElements]
|
||||||
matchingURLs: [documentElement getElementsByTagName: @"href"]
|
matchingURLs: [documentElement getElementsByTagName: @"href"]
|
||||||
toResponse: r];
|
toResponse: r];
|
||||||
[r appendContentString:@"</D:multistatus>"];
|
[r appendContentString:@"</D:multistatus>"];
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
@interface EOQualifier (SOGoMailDAVExtension)
|
@interface EOQualifier (SOGoMailDAVExtension)
|
||||||
|
|
||||||
+ (id) qualifierFromMailDAVMailFilters: (DOMElement *) mailFilters;
|
+ (id) qualifierFromMailDAVMailFilters: (id <DOMElement>) mailFilters;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -35,14 +35,14 @@
|
||||||
|
|
||||||
@implementation EOQualifier (SOGoMailDAVExtension)
|
@implementation EOQualifier (SOGoMailDAVExtension)
|
||||||
|
|
||||||
+ (id) qualifierFromMailDAVMailFilters: (DOMElement *) mailFilters
|
+ (id) qualifierFromMailDAVMailFilters: (id <DOMElement>) mailFilters
|
||||||
{
|
{
|
||||||
EOQualifier *qualifier;
|
EOQualifier *qualifier;
|
||||||
NSMutableArray *args, *formats;
|
NSMutableArray *args, *formats;
|
||||||
NSArray *flags, *strings, *dates;
|
NSArray *flags, *strings, *dates;
|
||||||
NSString *valueA, *valueB, *tagName, *format, *negate;
|
NSString *valueA, *valueB, *tagName, *format, *negate;
|
||||||
id <DOMNodeList> list;
|
id <DOMNodeList> list;
|
||||||
DOMElement *current;
|
id <DOMElement> current;
|
||||||
NSCalendarDate *startDate, *endDate;
|
NSCalendarDate *startDate, *endDate;
|
||||||
int count, max;
|
int count, max;
|
||||||
BOOL datesAreEqual;
|
BOOL datesAreEqual;
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#import <SOGo/SOGoDomainDefaults.h>
|
#import <SOGo/SOGoDomainDefaults.h>
|
||||||
#import <SOGo/SOGoUser.h>
|
#import <SOGo/SOGoUser.h>
|
||||||
#import <SOGo/SOGoUserDefaults.h>
|
#import <SOGo/SOGoUserDefaults.h>
|
||||||
|
#import <SOGo/SOGoUserSettings.h>
|
||||||
#import <SOGo/SOGoSieveManager.h>
|
#import <SOGo/SOGoSieveManager.h>
|
||||||
|
|
||||||
#import "SOGoDraftsFolder.h"
|
#import "SOGoDraftsFolder.h"
|
||||||
|
|
|
@ -25,12 +25,15 @@
|
||||||
#import <Foundation/NSDictionary.h>
|
#import <Foundation/NSDictionary.h>
|
||||||
|
|
||||||
#import <NGObjWeb/SoObject+SoDAV.h>
|
#import <NGObjWeb/SoObject+SoDAV.h>
|
||||||
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
#import <NGExtensions/NSNull+misc.h>
|
#import <NGExtensions/NSNull+misc.h>
|
||||||
#import <NGExtensions/NSObject+Logs.h>
|
#import <NGExtensions/NSObject+Logs.h>
|
||||||
#import <NGExtensions/NSString+misc.h>
|
#import <NGExtensions/NSString+misc.h>
|
||||||
#import <NGExtensions/NSURL+misc.h>
|
#import <NGExtensions/NSURL+misc.h>
|
||||||
|
#import <NGImap4/NGImap4Connection.h>
|
||||||
|
|
||||||
#import <SOGo/SOGoCache.h>
|
#import <SOGo/SOGoCache.h>
|
||||||
|
#import <SOGo/SOGoUser.h>
|
||||||
|
|
||||||
#import "SOGoMailAccount.h"
|
#import "SOGoMailAccount.h"
|
||||||
#import "SOGoMailManager.h"
|
#import "SOGoMailManager.h"
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#import <Foundation/NSDictionary.h>
|
#import <Foundation/NSDictionary.h>
|
||||||
#import <Foundation/NSEnumerator.h>
|
#import <Foundation/NSEnumerator.h>
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
|
#import <Foundation/NSURL.h>
|
||||||
|
|
||||||
#import <NGObjWeb/NSException+HTTP.h>
|
#import <NGObjWeb/NSException+HTTP.h>
|
||||||
#import <NGObjWeb/SoObject+SoDAV.h>
|
#import <NGObjWeb/SoObject+SoDAV.h>
|
||||||
|
|
|
@ -1494,7 +1494,7 @@ static NSString *defaultUserID = @"anyone";
|
||||||
return davIMAPFieldsTable;
|
return davIMAPFieldsTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) _sortElementIsAscending: (DOMElement *) sortElement
|
- (BOOL) _sortElementIsAscending: (NGDOMNodeWithChildren <DOMElement> *) sortElement
|
||||||
{
|
{
|
||||||
NSString *davReverseAttr;
|
NSString *davReverseAttr;
|
||||||
BOOL orderIsAscending;
|
BOOL orderIsAscending;
|
||||||
|
@ -1512,7 +1512,7 @@ static NSString *defaultUserID = @"anyone";
|
||||||
return orderIsAscending;
|
return orderIsAscending;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSArray *) _sortOrderingsFromSortElement: (DOMElement *) sortElement
|
- (NSArray *) _sortOrderingsFromSortElement: (NGDOMNodeWithChildren *) sortElement
|
||||||
{
|
{
|
||||||
static NSMutableDictionary *criteriasMap = nil;
|
static NSMutableDictionary *criteriasMap = nil;
|
||||||
NSArray *davSortCriterias;
|
NSArray *davSortCriterias;
|
||||||
|
@ -1727,7 +1727,7 @@ static NSString *defaultUserID = @"anyone";
|
||||||
return davIMAPFields;
|
return davIMAPFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDictionary *) parseDAVRequestedProperties: (DOMElement *) propElement
|
- (NSDictionary *) parseDAVRequestedProperties: (NGDOMNodeWithChildren *) propElement
|
||||||
{
|
{
|
||||||
NSArray *properties;
|
NSArray *properties;
|
||||||
NSDictionary *imapFieldsTable;
|
NSDictionary *imapFieldsTable;
|
||||||
|
@ -1747,7 +1747,8 @@ static NSString *defaultUserID = @"anyone";
|
||||||
{
|
{
|
||||||
WOResponse *r;
|
WOResponse *r;
|
||||||
id <DOMDocument> document;
|
id <DOMDocument> document;
|
||||||
DOMElement *documentElement, *propElement, *filterElement, *sortElement;
|
id <DOMElement> filterElement;
|
||||||
|
NGDOMNodeWithChildren *documentElement, *propElement, *sortElement;
|
||||||
NSDictionary *properties;
|
NSDictionary *properties;
|
||||||
NSArray *messages, *sortOrderings;
|
NSArray *messages, *sortOrderings;
|
||||||
EOQualifier *searchQualifier;
|
EOQualifier *searchQualifier;
|
||||||
|
@ -1756,16 +1757,18 @@ static NSString *defaultUserID = @"anyone";
|
||||||
[r prepareDAVResponse];
|
[r prepareDAVResponse];
|
||||||
|
|
||||||
document = [[context request] contentAsDOMDocument];
|
document = [[context request] contentAsDOMDocument];
|
||||||
documentElement = (DOMElement *) [document documentElement];
|
documentElement = [document documentElement];
|
||||||
|
|
||||||
propElement = [documentElement firstElementWithTag: @"prop"
|
propElement = (NGDOMNodeWithChildren *) [documentElement
|
||||||
|
firstElementWithTag: @"prop"
|
||||||
inNamespace: XMLNS_WEBDAV];
|
inNamespace: XMLNS_WEBDAV];
|
||||||
properties = [self parseDAVRequestedProperties: propElement];
|
properties = [self parseDAVRequestedProperties: propElement];
|
||||||
filterElement = [documentElement firstElementWithTag: @"mail-filters"
|
filterElement = [documentElement firstElementWithTag: @"mail-filters"
|
||||||
inNamespace: XMLNS_INVERSEDAV];
|
inNamespace: XMLNS_INVERSEDAV];
|
||||||
searchQualifier = [EOQualifier
|
searchQualifier = [EOQualifier
|
||||||
qualifierFromMailDAVMailFilters: filterElement];
|
qualifierFromMailDAVMailFilters: filterElement];
|
||||||
sortElement = [documentElement firstElementWithTag: @"sort"
|
sortElement = (NGDOMNodeWithChildren *) [documentElement
|
||||||
|
firstElementWithTag: @"sort"
|
||||||
inNamespace: XMLNS_INVERSEDAV];
|
inNamespace: XMLNS_INVERSEDAV];
|
||||||
sortOrderings = [self _sortOrderingsFromSortElement: sortElement];
|
sortOrderings = [self _sortOrderingsFromSortElement: sortElement];
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#import <Foundation/NSDictionary.h>
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
|
|
||||||
#import <SOGo/NSArray+Utilities.h>
|
#import <SOGo/NSArray+Utilities.h>
|
||||||
|
|
|
@ -41,8 +41,8 @@
|
||||||
- (id <DOMNodeList>) childElementsWithTag: (NSString *) tagName
|
- (id <DOMNodeList>) childElementsWithTag: (NSString *) tagName
|
||||||
inNamespace: (NSString *) namespace;
|
inNamespace: (NSString *) namespace;
|
||||||
|
|
||||||
- (DOMElement *) firstElementWithTag: (NSString *) tagName;
|
- (id <DOMElement>) firstElementWithTag: (NSString *) tagName;
|
||||||
- (DOMElement *) firstElementWithTag: (NSString *) tagName
|
- (id <DOMElement>) firstElementWithTag: (NSString *) tagName
|
||||||
inNamespace: (NSString *) namespace;
|
inNamespace: (NSString *) namespace;
|
||||||
|
|
||||||
- (NSArray *) flatPropertyNameOfSubElements;
|
- (NSArray *) flatPropertyNameOfSubElements;
|
||||||
|
|
|
@ -87,11 +87,11 @@
|
||||||
return [self childElementsWithTag: tagName inNamespace: nil];
|
return [self childElementsWithTag: tagName inNamespace: nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (DOMElement *) firstElementWithTag: (NSString *) tagName
|
- (id <DOMElement>) firstElementWithTag: (NSString *) tagName
|
||||||
inNamespace: (NSString *) namespace
|
inNamespace: (NSString *) namespace
|
||||||
{
|
{
|
||||||
id <DOMNodeList> nodes;
|
id <DOMNodeList> nodes;
|
||||||
DOMElement *node, *currentElement;
|
id <DOMElement> node, currentElement;
|
||||||
unsigned int count, max;
|
unsigned int count, max;
|
||||||
|
|
||||||
node = nil;
|
node = nil;
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (DOMElement *) firstElementWithTag: (NSString *) tagName
|
- (id <DOMElement>) firstElementWithTag: (NSString *) tagName
|
||||||
{
|
{
|
||||||
return [self firstElementWithTag: tagName inNamespace: nil];
|
return [self firstElementWithTag: tagName inNamespace: nil];
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
{
|
{
|
||||||
NSMutableArray *propertyNames;
|
NSMutableArray *propertyNames;
|
||||||
id <DOMNodeList> children;
|
id <DOMNodeList> children;
|
||||||
DOMElement *currentElement;
|
id <DOMElement> currentElement;
|
||||||
unsigned int count, max;
|
unsigned int count, max;
|
||||||
|
|
||||||
propertyNames = [NSMutableArray array];
|
propertyNames = [NSMutableArray array];
|
||||||
|
@ -131,7 +131,8 @@
|
||||||
{
|
{
|
||||||
currentElement = [children objectAtIndex: count];
|
currentElement = [children objectAtIndex: count];
|
||||||
if ([currentElement nodeType] == DOM_ELEMENT_NODE)
|
if ([currentElement nodeType] == DOM_ELEMENT_NODE)
|
||||||
[propertyNames addObject: [currentElement asPropertyName]];
|
[propertyNames
|
||||||
|
addObject: [(NGDOMElement *) currentElement asPropertyName]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return propertyNames;
|
return propertyNames;
|
||||||
|
|
|
@ -318,7 +318,7 @@ static Class NSStringKlass = Nil;
|
||||||
- (BOOL) migrateOldDefaultsWithDictionary: (NSDictionary *) migratedKeys
|
- (BOOL) migrateOldDefaultsWithDictionary: (NSDictionary *) migratedKeys
|
||||||
{
|
{
|
||||||
NSArray *allKeys;
|
NSArray *allKeys;
|
||||||
id currentValue, existingValue;
|
id currentValue;
|
||||||
NSString *oldName, *newName;
|
NSString *oldName, *newName;
|
||||||
int count, max;
|
int count, max;
|
||||||
BOOL requireSync;
|
BOOL requireSync;
|
||||||
|
@ -334,7 +334,6 @@ static Class NSStringKlass = Nil;
|
||||||
if (currentValue)
|
if (currentValue)
|
||||||
{
|
{
|
||||||
newName = [migratedKeys objectForKey: oldName];
|
newName = [migratedKeys objectForKey: oldName];
|
||||||
existingValue = [source objectForKey: newName];
|
|
||||||
requireSync = YES;
|
requireSync = YES;
|
||||||
[source setObject: currentValue forKey: newName];
|
[source setObject: currentValue forKey: newName];
|
||||||
[source removeObjectForKey: oldName];
|
[source removeObjectForKey: oldName];
|
||||||
|
|
|
@ -34,10 +34,10 @@
|
||||||
@class WOContext;
|
@class WOContext;
|
||||||
@class WOResponse;
|
@class WOResponse;
|
||||||
|
|
||||||
@class DOMElement;
|
|
||||||
|
|
||||||
@class SOGoUser;
|
@class SOGoUser;
|
||||||
|
|
||||||
|
@protocol DOMElement;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
SOGoGCSFolder
|
SOGoGCSFolder
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
- (NSURL *) realDavURL;
|
- (NSURL *) realDavURL;
|
||||||
|
|
||||||
- (NSDictionary *) davSQLFieldsTable;
|
- (NSDictionary *) davSQLFieldsTable;
|
||||||
- (NSDictionary *) parseDAVRequestedProperties: (DOMElement *) propElement;
|
- (NSDictionary *) parseDAVRequestedProperties: (id <DOMElement>) propElement;
|
||||||
|
|
||||||
- (NSString *) davCollectionTag;
|
- (NSString *) davCollectionTag;
|
||||||
|
|
||||||
|
|
|
@ -1041,12 +1041,12 @@ static NSArray *childRecordFields = nil;
|
||||||
return davSQLFields;
|
return davSQLFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDictionary *) parseDAVRequestedProperties: (DOMElement *) propElement
|
- (NSDictionary *) parseDAVRequestedProperties: (id <DOMElement>) propElement
|
||||||
{
|
{
|
||||||
NSArray *properties;
|
NSArray *properties;
|
||||||
NSDictionary *sqlFieldsTable;
|
NSDictionary *sqlFieldsTable;
|
||||||
|
|
||||||
properties = [propElement flatPropertyNameOfSubElements];
|
properties = [(NGDOMNodeWithChildren *) propElement flatPropertyNameOfSubElements];
|
||||||
sqlFieldsTable = [self _davSQLFieldsForProperties: properties];
|
sqlFieldsTable = [self _davSQLFieldsForProperties: properties];
|
||||||
|
|
||||||
return sqlFieldsTable;
|
return sqlFieldsTable;
|
||||||
|
@ -1331,7 +1331,7 @@ static NSArray *childRecordFields = nil;
|
||||||
{
|
{
|
||||||
WOResponse *r;
|
WOResponse *r;
|
||||||
id <DOMDocument> document;
|
id <DOMDocument> document;
|
||||||
DOMElement *documentElement, *propElement;
|
id <DOMElement> documentElement, propElement;
|
||||||
NSString *syncToken;
|
NSString *syncToken;
|
||||||
NSDictionary *properties;
|
NSDictionary *properties;
|
||||||
NSArray *records;
|
NSArray *records;
|
||||||
|
@ -1340,13 +1340,16 @@ static NSArray *childRecordFields = nil;
|
||||||
[r prepareDAVResponse];
|
[r prepareDAVResponse];
|
||||||
|
|
||||||
document = [[context request] contentAsDOMDocument];
|
document = [[context request] contentAsDOMDocument];
|
||||||
documentElement = (DOMElement *) [document documentElement];
|
documentElement = [document documentElement];
|
||||||
syncToken = [[documentElement firstElementWithTag: @"sync-token"
|
syncToken = [(NGDOMNode *)
|
||||||
inNamespace: XMLNS_WEBDAV] textValue];
|
[(NGDOMNodeWithChildren *)
|
||||||
|
documentElement firstElementWithTag: @"sync-token"
|
||||||
|
inNamespace: XMLNS_WEBDAV]
|
||||||
|
textValue];
|
||||||
if ([self _isValidSyncToken: syncToken])
|
if ([self _isValidSyncToken: syncToken])
|
||||||
{
|
{
|
||||||
propElement = [documentElement firstElementWithTag: @"prop"
|
propElement = [(NGDOMNodeWithChildren *) documentElement
|
||||||
inNamespace: XMLNS_WEBDAV];
|
firstElementWithTag: @"prop" inNamespace: XMLNS_WEBDAV];
|
||||||
properties = [self parseDAVRequestedProperties: propElement];
|
properties = [self parseDAVRequestedProperties: propElement];
|
||||||
records = [self _fetchSyncTokenFields: properties
|
records = [self _fetchSyncTokenFields: properties
|
||||||
matchingSyncToken: syncToken];
|
matchingSyncToken: syncToken];
|
||||||
|
@ -2089,7 +2092,7 @@ static NSArray *childRecordFields = nil;
|
||||||
{
|
{
|
||||||
WOResponse *r;
|
WOResponse *r;
|
||||||
id <DOMDocument> document;
|
id <DOMDocument> document;
|
||||||
DOMElement *documentElement, *propElement;
|
id <DOMElement> documentElement, propElement;
|
||||||
|
|
||||||
r = [context response];
|
r = [context response];
|
||||||
[r prepareDAVResponse];
|
[r prepareDAVResponse];
|
||||||
|
@ -2097,8 +2100,9 @@ static NSArray *childRecordFields = nil;
|
||||||
[NSString stringWithFormat: @"<D:multistatus xmlns:D=\"DAV:\""
|
[NSString stringWithFormat: @"<D:multistatus xmlns:D=\"DAV:\""
|
||||||
@" xmlns:C=\"%@\">", namespace]];
|
@" xmlns:C=\"%@\">", namespace]];
|
||||||
document = [[queryContext request] contentAsDOMDocument];
|
document = [[queryContext request] contentAsDOMDocument];
|
||||||
documentElement = (DOMElement *) [document documentElement];
|
documentElement = [document documentElement];
|
||||||
propElement = [documentElement firstElementWithTag: @"prop"
|
propElement = [(NGDOMNodeWithChildren *)
|
||||||
|
documentElement firstElementWithTag: @"prop"
|
||||||
inNamespace: @"DAV:"];
|
inNamespace: @"DAV:"];
|
||||||
[self _appendComponentProperties: [self parseDAVRequestedProperties: propElement]
|
[self _appendComponentProperties: [self parseDAVRequestedProperties: propElement]
|
||||||
matchingURLs: [documentElement getElementsByTagName: @"href"]
|
matchingURLs: [documentElement getElementsByTagName: @"href"]
|
||||||
|
|
|
@ -576,7 +576,7 @@ static SoSecurityManager *sm = nil;
|
||||||
{
|
{
|
||||||
NSMutableArray *supportedTypes;
|
NSMutableArray *supportedTypes;
|
||||||
id <DOMNodeList> children;
|
id <DOMNodeList> children;
|
||||||
DOMElement *element;
|
id <DOMElement> element;
|
||||||
NSException *error;
|
NSException *error;
|
||||||
NSArray *allTypes;
|
NSArray *allTypes;
|
||||||
id o;
|
id o;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
|
|
||||||
#import "SOGoUser.h"
|
#import "SOGoUser.h"
|
||||||
|
#import "SOGoUserFolder.h"
|
||||||
|
|
||||||
#import "SOGoPublicBaseFolder.h"
|
#import "SOGoPublicBaseFolder.h"
|
||||||
|
|
||||||
|
|
|
@ -170,12 +170,10 @@
|
||||||
|
|
||||||
cc = [self clientCapabilities];
|
cc = [self clientCapabilities];
|
||||||
|
|
||||||
b = [[cc userAgent] rangeOfString: @"CFNetwork"].location != NSNotFound
|
b = ([[cc userAgent] rangeOfString: @"CFNetwork"].location != NSNotFound
|
||||||
&& [[cc userAgent] rangeOfString: @"Darwin"].location != NSNotFound
|
&& ([[cc userAgent] rangeOfString: @"Darwin"].location != NSNotFound
|
||||||
|| ( [[cc userAgent] rangeOfString: @"CFNetwork"].location != NSNotFound
|
|| [[cc userAgent] rangeOfString: @"Mac OS X"].location != NSNotFound)
|
||||||
|| [[cc userAgent] rangeOfString: @"Mac OS X"].location != NSNotFound )
|
&& [[cc userAgent] rangeOfString: @"AddressBook"].location != NSNotFound);
|
||||||
&& [[cc userAgent] rangeOfString: @"AddressBook"].location != NSNotFound;
|
|
||||||
|
|
||||||
|
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#import <Foundation/NSArray.h>
|
#import <Foundation/NSArray.h>
|
||||||
#import <Foundation/NSCalendarDate.h>
|
#import <Foundation/NSCalendarDate.h>
|
||||||
|
#import <Foundation/NSDictionary.h>
|
||||||
#import <Foundation/NSProcessInfo.h>
|
#import <Foundation/NSProcessInfo.h>
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,10 @@
|
||||||
#define SOGOSOCKD_H
|
#define SOGOSOCKD_H
|
||||||
|
|
||||||
#import <Foundation/NSObject.h>
|
#import <Foundation/NSObject.h>
|
||||||
|
#import <Foundation/NSRunLoop.h>
|
||||||
|
|
||||||
@class NGPassiveSocket;
|
@class NGPassiveSocket;
|
||||||
|
|
||||||
@protocol RunLoopEvents;
|
|
||||||
|
|
||||||
@interface SOGoSockD : NSObject <RunLoopEvents>
|
@interface SOGoSockD : NSObject <RunLoopEvents>
|
||||||
{
|
{
|
||||||
NGPassiveSocket *listeningSocket;
|
NGPassiveSocket *listeningSocket;
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#import <Foundation/NSArray.h>
|
#import <Foundation/NSArray.h>
|
||||||
#import <Foundation/NSAutoreleasePool.h>
|
#import <Foundation/NSAutoreleasePool.h>
|
||||||
|
#import <Foundation/NSCalendarDate.h>
|
||||||
#import <Foundation/NSDictionary.h>
|
#import <Foundation/NSDictionary.h>
|
||||||
#import <Foundation/NSEnumerator.h>
|
#import <Foundation/NSEnumerator.h>
|
||||||
#import <Foundation/NSException.h>
|
#import <Foundation/NSException.h>
|
||||||
|
@ -511,7 +512,7 @@
|
||||||
rc = NO;
|
rc = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NO;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) processFolder: (NSString *) folderId
|
- (BOOL) processFolder: (NSString *) folderId
|
||||||
|
|
|
@ -348,9 +348,8 @@ typedef enum SOGoToolRestoreMode {
|
||||||
{
|
{
|
||||||
NSDictionary *existingRecords, *currentRecord;
|
NSDictionary *existingRecords, *currentRecord;
|
||||||
NSString *cName, *cContent;
|
NSString *cName, *cContent;
|
||||||
NSException *ex;
|
int count, max;
|
||||||
|
unsigned int version;
|
||||||
int count, max, version;
|
|
||||||
BOOL rc;
|
BOOL rc;
|
||||||
|
|
||||||
if (records)
|
if (records)
|
||||||
|
@ -367,7 +366,7 @@ typedef enum SOGoToolRestoreMode {
|
||||||
{
|
{
|
||||||
NSLog (@"restoring record '%@'", cName);
|
NSLog (@"restoring record '%@'", cName);
|
||||||
cContent = [currentRecord objectForKey: @"c_content"];
|
cContent = [currentRecord objectForKey: @"c_content"];
|
||||||
ex = [gcsFolder writeContent: cContent toName: cName
|
[gcsFolder writeContent: cContent toName: cName
|
||||||
baseVersion: &version];
|
baseVersion: &version];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,11 +244,9 @@
|
||||||
SOGoGCSFolder *sourceFolder, *destinationFolder;
|
SOGoGCSFolder *sourceFolder, *destinationFolder;
|
||||||
SOGoParentFolder *folders;
|
SOGoParentFolder *folders;
|
||||||
SoSecurityManager *sm;
|
SoSecurityManager *sm;
|
||||||
WORequest *request;
|
|
||||||
unsigned int errorCount;
|
unsigned int errorCount;
|
||||||
|
|
||||||
sm = [SoSecurityManager sharedSecurityManager];
|
sm = [SoSecurityManager sharedSecurityManager];
|
||||||
request = [context request];
|
|
||||||
ex = nil;
|
ex = nil;
|
||||||
errorCount = 0;
|
errorCount = 0;
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,10 @@
|
||||||
#import <Foundation/NSArray.h>
|
#import <Foundation/NSArray.h>
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
|
|
||||||
|
#import <NGObjWeb/WOContext.h>
|
||||||
#import <NGObjWeb/WODirectAction.h>
|
#import <NGObjWeb/WODirectAction.h>
|
||||||
#import <NGObjWeb/WORequest.h>
|
#import <NGObjWeb/WORequest.h>
|
||||||
|
#import <NGObjWeb/WOResponse.h>
|
||||||
|
|
||||||
#import <NGCards/NGVCard.h>
|
#import <NGCards/NGVCard.h>
|
||||||
|
|
||||||
|
|
|
@ -27,14 +27,14 @@
|
||||||
@class NSString;
|
@class NSString;
|
||||||
@class NSMutableDictionary;
|
@class NSMutableDictionary;
|
||||||
|
|
||||||
@class SOGoContactFolder;
|
@protocol SOGoContactFolder;
|
||||||
|
|
||||||
@interface UIxContactEditor : UIxComponent
|
@interface UIxContactEditor : UIxComponent
|
||||||
{
|
{
|
||||||
id addressBookItem;
|
id addressBookItem;
|
||||||
NSString *item;
|
NSString *item;
|
||||||
NSMutableDictionary *ldifRecord; /* contains the values for editing */
|
NSMutableDictionary *ldifRecord; /* contains the values for editing */
|
||||||
SOGoContactFolder *componentAddressBook;
|
id <SOGoContactFolder> componentAddressBook;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSMutableDictionary *) ldifRecord;
|
- (NSMutableDictionary *) ldifRecord;
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
- (BOOL) isNew;
|
- (BOOL) isNew;
|
||||||
- (NSArray *) addressBooksList;
|
- (NSArray *) addressBooksList;
|
||||||
- (SOGoContactFolder *) componentAddressBook;
|
- (id <SOGoContactFolder>) componentAddressBook;
|
||||||
- (NSString *) addressBookDisplayName;
|
- (NSString *) addressBookDisplayName;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -185,7 +185,7 @@ static Class SOGoContactGCSEntryK = Nil;
|
||||||
NSMutableArray *addressBooksList;
|
NSMutableArray *addressBooksList;
|
||||||
SoSecurityManager *sm;
|
SoSecurityManager *sm;
|
||||||
SOGoContactFolders *folderContainer;
|
SOGoContactFolders *folderContainer;
|
||||||
SOGoContactFolder *folder, *currentFolder;
|
id <SOGoContactFolder> folder, currentFolder;
|
||||||
|
|
||||||
addressBooksList = [NSMutableArray array];
|
addressBooksList = [NSMutableArray array];
|
||||||
sm = [SoSecurityManager sharedSecurityManager];
|
sm = [SoSecurityManager sharedSecurityManager];
|
||||||
|
@ -207,16 +207,12 @@ static Class SOGoContactGCSEntryK = Nil;
|
||||||
return addressBooksList;
|
return addressBooksList;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (SOGoContactFolder *) componentAddressBook
|
- (id <SOGoContactFolder>) componentAddressBook
|
||||||
{
|
{
|
||||||
SOGoContactFolder *folder;
|
return [[self clientObject] container];
|
||||||
|
|
||||||
folder = [[self clientObject] container];
|
|
||||||
|
|
||||||
return folder;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setComponentAddressBook: (SOGoContactFolder *) _componentAddressBook
|
- (void) setComponentAddressBook: (id <SOGoContactFolder>) _componentAddressBook
|
||||||
{
|
{
|
||||||
ASSIGN (componentAddressBook, _componentAddressBook);
|
ASSIGN (componentAddressBook, _componentAddressBook);
|
||||||
}
|
}
|
||||||
|
@ -224,7 +220,7 @@ static Class SOGoContactGCSEntryK = Nil;
|
||||||
- (NSString *) addressBookDisplayName
|
- (NSString *) addressBookDisplayName
|
||||||
{
|
{
|
||||||
NSString *fDisplayName;
|
NSString *fDisplayName;
|
||||||
SOGoContactFolder *folder;
|
SOGoObject <SOGoContactFolder> *folder;
|
||||||
SOGoContactFolders *parentFolder;
|
SOGoContactFolders *parentFolder;
|
||||||
|
|
||||||
fDisplayName = [addressBookItem displayName];
|
fDisplayName = [addressBookItem displayName];
|
||||||
|
@ -371,16 +367,20 @@ static Class SOGoContactGCSEntryK = Nil;
|
||||||
[contact save];
|
[contact save];
|
||||||
|
|
||||||
if (componentAddressBook && componentAddressBook != [self componentAddressBook])
|
if (componentAddressBook && componentAddressBook != [self componentAddressBook])
|
||||||
|
{
|
||||||
|
if ([contact isKindOfClass: SOGoContactGCSEntryK])
|
||||||
{
|
{
|
||||||
sm = [SoSecurityManager sharedSecurityManager];
|
sm = [SoSecurityManager sharedSecurityManager];
|
||||||
if (![sm validatePermission: SoPerm_DeleteObjects
|
if (![sm validatePermission: SoPerm_DeleteObjects
|
||||||
onObject: componentAddressBook
|
onObject: componentAddressBook
|
||||||
inContext: context])
|
inContext: context]
|
||||||
{
|
&& ![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
|
||||||
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
|
|
||||||
onObject: componentAddressBook
|
onObject: componentAddressBook
|
||||||
inContext: context])
|
inContext: context])
|
||||||
[contact moveToFolder: (SOGoGCSFolder *)componentAddressBook]; // TODO: handle exception
|
[(SOGoContactGCSEntry *) contact
|
||||||
|
moveToFolder: (SOGoGCSFolder *)componentAddressBook]; // TODO:
|
||||||
|
// handle
|
||||||
|
// exception
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <Foundation/NSDictionary.h>
|
#import <Foundation/NSDictionary.h>
|
||||||
|
#import <Foundation/NSException.h>
|
||||||
#import <Foundation/NSValue.h>
|
#import <Foundation/NSValue.h>
|
||||||
|
|
||||||
#import <NGObjWeb/WOResponse.h>
|
#import <NGObjWeb/WOResponse.h>
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
02111-1307, USA.
|
02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#import <Foundation/NSDictionary.h>
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
|
|
||||||
#import <NGObjWeb/WOComponent.h>
|
#import <NGObjWeb/WOComponent.h>
|
||||||
|
|
|
@ -213,13 +213,6 @@ static NSArray *infoKeys = nil;
|
||||||
|
|
||||||
- (NSString *) localeCode
|
- (NSString *) localeCode
|
||||||
{
|
{
|
||||||
SOGoUserDefaults *ud;
|
|
||||||
NSDictionary *locale;
|
|
||||||
|
|
||||||
ud = [[context activeUser] userDefaults];
|
|
||||||
locale = [[self resourceManager]
|
|
||||||
localeForLanguageNamed: [ud language]];
|
|
||||||
|
|
||||||
// WARNING : NSLocaleCode is not defined in <Foundation/NSUserDefaults.h>
|
// WARNING : NSLocaleCode is not defined in <Foundation/NSUserDefaults.h>
|
||||||
return [locale objectForKey: @"NSLocaleCode"];
|
return [locale objectForKey: @"NSLocaleCode"];
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
02111-1307, USA.
|
02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#import <Foundation/NSDictionary.h>
|
||||||
|
|
||||||
#import <NGObjWeb/WOContext.h>
|
#import <NGObjWeb/WOContext.h>
|
||||||
#import <NGObjWeb/WORequest.h>
|
#import <NGObjWeb/WORequest.h>
|
||||||
#import <EOControl/EOQualifier.h>
|
#import <EOControl/EOQualifier.h>
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
#import <SOGo/SOGoDateFormatter.h>
|
#import <SOGo/SOGoDateFormatter.h>
|
||||||
#import <SOGo/SOGoUser.h>
|
#import <SOGo/SOGoUser.h>
|
||||||
#import <SOGo/SOGoUserDefaults.h>
|
#import <SOGo/SOGoUserDefaults.h>
|
||||||
|
#import <SOGo/SOGoUserSettings.h>
|
||||||
|
|
||||||
#import <UI/Common/WODirectAction+SOGo.h>
|
#import <UI/Common/WODirectAction+SOGo.h>
|
||||||
|
|
||||||
|
|
|
@ -44,10 +44,12 @@
|
||||||
#import <Contacts/SOGoContactFolders.h>
|
#import <Contacts/SOGoContactFolders.h>
|
||||||
#import <Contacts/SOGoContactLDIFEntry.h>
|
#import <Contacts/SOGoContactLDIFEntry.h>
|
||||||
|
|
||||||
#import <Mailer/SOGoMailObject.h>
|
#import <Mailer/SOGoDraftsFolder.h>
|
||||||
#import <Mailer/SOGoMailAccount.h>
|
#import <Mailer/SOGoMailAccount.h>
|
||||||
#import <Mailer/SOGoMailAccounts.h>
|
#import <Mailer/SOGoMailAccounts.h>
|
||||||
#import <Mailer/SOGoMailFolder.h>
|
#import <Mailer/SOGoMailFolder.h>
|
||||||
|
#import <Mailer/SOGoMailObject.h>
|
||||||
|
#import <Mailer/SOGoSentFolder.h>
|
||||||
#import <SOGo/NSDictionary+URL.h>
|
#import <SOGo/NSDictionary+URL.h>
|
||||||
#import <SOGo/NSArray+Utilities.h>
|
#import <SOGo/NSArray+Utilities.h>
|
||||||
#import <SOGo/NSString+Utilities.h>
|
#import <SOGo/NSString+Utilities.h>
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
02111-1307, USA.
|
02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#import <Foundation/NSDictionary.h>
|
||||||
|
|
||||||
#import <NGObjWeb/WOComponent.h>
|
#import <NGObjWeb/WOComponent.h>
|
||||||
|
|
||||||
@class NSString, NSMutableArray, NSDictionary;
|
@class NSString, NSMutableArray, NSDictionary;
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
02111-1307, USA.
|
02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#import <Foundation/NSDictionary.h>
|
||||||
#import <Foundation/NSException.h>
|
#import <Foundation/NSException.h>
|
||||||
#import <NGObjWeb/NSException+HTTP.h>
|
#import <NGObjWeb/NSException+HTTP.h>
|
||||||
#import <NGObjWeb/WORequest.h>
|
#import <NGObjWeb/WORequest.h>
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
#import <SOGo/SOGoUserFolder.h>
|
#import <SOGo/SOGoUserFolder.h>
|
||||||
#import <SOGo/WOResourceManager+SOGo.h>
|
#import <SOGo/WOResourceManager+SOGo.h>
|
||||||
#import <Mailer/SOGoMailAccount.h>
|
#import <Mailer/SOGoMailAccount.h>
|
||||||
|
#import <Mailer/SOGoMailAccounts.h>
|
||||||
|
|
||||||
#import "UIxPreferences.h"
|
#import "UIxPreferences.h"
|
||||||
|
|
||||||
|
@ -63,7 +64,6 @@
|
||||||
{
|
{
|
||||||
//NSDictionary *locale;
|
//NSDictionary *locale;
|
||||||
SOGoDomainDefaults *dd;
|
SOGoDomainDefaults *dd;
|
||||||
NSString *language;
|
|
||||||
|
|
||||||
if ((self = [super init]))
|
if ((self = [super init]))
|
||||||
{
|
{
|
||||||
|
@ -71,7 +71,6 @@
|
||||||
#warning user should be the owner rather than the activeUser
|
#warning user should be the owner rather than the activeUser
|
||||||
ASSIGN (user, [context activeUser]);
|
ASSIGN (user, [context activeUser]);
|
||||||
ASSIGN (today, [NSCalendarDate date]);
|
ASSIGN (today, [NSCalendarDate date]);
|
||||||
language = [userDefaults language];
|
|
||||||
|
|
||||||
calendarCategories = nil;
|
calendarCategories = nil;
|
||||||
calendarCategoriesColors = nil;
|
calendarCategoriesColors = nil;
|
||||||
|
|
|
@ -169,7 +169,7 @@
|
||||||
|
|
||||||
part = [NGMimeBodyPart bodyPartWithHeader: headerMap];
|
part = [NGMimeBodyPart bodyPartWithHeader: headerMap];
|
||||||
body = [[self body] dataUsingEncoding: NSUTF8StringEncoding];
|
body = [[self body] dataUsingEncoding: NSUTF8StringEncoding];
|
||||||
[part setBody: [self body]];
|
[part setBody: body];
|
||||||
|
|
||||||
return part;
|
return part;
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,7 @@
|
||||||
|
|
||||||
part = [NGMimeBodyPart bodyPartWithHeader: headerMap];
|
part = [NGMimeBodyPart bodyPartWithHeader: headerMap];
|
||||||
body = [[self body] dataUsingEncoding: NSUTF8StringEncoding];
|
body = [[self body] dataUsingEncoding: NSUTF8StringEncoding];
|
||||||
[part setBody: [self body]];
|
[part setBody: body];
|
||||||
|
|
||||||
return part;
|
return part;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#import <NGObjWeb/SoHTTPAuthenticator.h>
|
#import <NGObjWeb/SoHTTPAuthenticator.h>
|
||||||
#import <NGObjWeb/SoObjects.h>
|
#import <NGObjWeb/SoObjects.h>
|
||||||
#import <NGObjWeb/SoProduct.h>
|
#import <NGObjWeb/SoProduct.h>
|
||||||
#import <NGObjWeb/WOResourceManager.h>
|
|
||||||
#import <NGObjWeb/WORequest.h>
|
#import <NGObjWeb/WORequest.h>
|
||||||
#import <NGObjWeb/WOResponse.h>
|
#import <NGObjWeb/WOResponse.h>
|
||||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
|
@ -48,7 +47,9 @@
|
||||||
#import <SOGo/SOGoPermissions.h>
|
#import <SOGo/SOGoPermissions.h>
|
||||||
#import <SOGo/SOGoSystemDefaults.h>
|
#import <SOGo/SOGoSystemDefaults.h>
|
||||||
#import <SOGo/SOGoUser.h>
|
#import <SOGo/SOGoUser.h>
|
||||||
|
#import <SOGo/SOGoUserFolder.h>
|
||||||
#import <SOGo/SOGoUserDefaults.h>
|
#import <SOGo/SOGoUserDefaults.h>
|
||||||
|
#import <SOGo/WOResourceManager+SOGo.h>
|
||||||
|
|
||||||
#import "UIxJSClose.h"
|
#import "UIxJSClose.h"
|
||||||
|
|
||||||
|
@ -146,7 +147,8 @@ static SoProduct *commonProduct = nil;
|
||||||
queryParameters = nil;
|
queryParameters = nil;
|
||||||
ASSIGN (userDefaults, [[context activeUser] userDefaults]);
|
ASSIGN (userDefaults, [[context activeUser] userDefaults]);
|
||||||
language = [userDefaults language];
|
language = [userDefaults language];
|
||||||
ASSIGN (locale, [[self resourceManager] localeForLanguageNamed: language]);
|
ASSIGN (locale,
|
||||||
|
[[self resourceManager] localeForLanguageNamed: language]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#import <SOGo/SOGoUserDefaults.h>
|
#import <SOGo/SOGoUserDefaults.h>
|
||||||
#import <Appointments/iCalEvent+SOGo.h>
|
#import <Appointments/iCalEvent+SOGo.h>
|
||||||
#import <Appointments/SOGoAppointmentObject.h>
|
#import <Appointments/SOGoAppointmentObject.h>
|
||||||
|
#import <Appointments/SOGoAppointmentFolder.h>
|
||||||
|
|
||||||
#import <Common/WODirectAction+SOGo.h>
|
#import <Common/WODirectAction+SOGo.h>
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,6 @@
|
||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
{
|
{
|
||||||
NSDictionary *locale;
|
|
||||||
NSString *language;
|
|
||||||
SOGoUser *user;
|
SOGoUser *user;
|
||||||
SOGoUserDefaults *ud;
|
SOGoUserDefaults *ud;
|
||||||
|
|
||||||
|
@ -55,8 +53,6 @@
|
||||||
user = [context activeUser];
|
user = [context activeUser];
|
||||||
ud = [user userDefaults];
|
ud = [user userDefaults];
|
||||||
ASSIGN (timeFormat, [ud timeFormat]);
|
ASSIGN (timeFormat, [ud timeFormat]);
|
||||||
language = [ud language];
|
|
||||||
locale = [[self resourceManager] localeForLanguageNamed: language];
|
|
||||||
|
|
||||||
daysToDisplay = nil;
|
daysToDisplay = nil;
|
||||||
hoursToDisplay = nil;
|
hoursToDisplay = nil;
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
#import <Foundation/NSValue.h>
|
#import <Foundation/NSValue.h>
|
||||||
#import <NGObjWeb/NSException+HTTP.h>
|
#import <NGObjWeb/NSException+HTTP.h>
|
||||||
#import <NGObjWeb/WORequest.h>
|
#import <NGObjWeb/WORequest.h>
|
||||||
|
#import <NGObjWeb/WOResponse.h>
|
||||||
|
|
||||||
|
#import <NGCards/iCalCalendar.h>
|
||||||
|
|
||||||
#import <SOGo/NSDictionary+Utilities.h>
|
#import <SOGo/NSDictionary+Utilities.h>
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,6 @@
|
||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
{
|
{
|
||||||
NSDictionary *locale;
|
|
||||||
SOGoUserDefaults *ud;
|
|
||||||
|
|
||||||
if ((self = [super init]))
|
if ((self = [super init]))
|
||||||
{
|
{
|
||||||
// monthAptFormatter
|
// monthAptFormatter
|
||||||
|
@ -50,8 +47,6 @@
|
||||||
// [monthAptFormatter setShortMonthTitleOnly];
|
// [monthAptFormatter setShortMonthTitleOnly];
|
||||||
// dateFormatter = [[SOGoDateFormatter alloc]
|
// dateFormatter = [[SOGoDateFormatter alloc]
|
||||||
// initWithLocale: [self locale]];
|
// initWithLocale: [self locale]];
|
||||||
ud = [[context activeUser] userDefaults];
|
|
||||||
locale = [[self resourceManager] localeForLanguageNamed: [ud language]];
|
|
||||||
dayNames = [locale objectForKey: NSWeekDayNameArray];
|
dayNames = [locale objectForKey: NSWeekDayNameArray];
|
||||||
[dayNames retain];
|
[dayNames retain];
|
||||||
monthNames = [locale objectForKey: NSMonthNameArray];
|
monthNames = [locale objectForKey: NSMonthNameArray];
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#import <NGObjWeb/NSException+HTTP.h>
|
#import <NGObjWeb/NSException+HTTP.h>
|
||||||
#import <NGObjWeb/WOApplication.h>
|
#import <NGObjWeb/WOApplication.h>
|
||||||
#import <NGObjWeb/WORequest.h>
|
#import <NGObjWeb/WORequest.h>
|
||||||
|
#import <NGObjWeb/WOResponse.h>
|
||||||
#import <NGExtensions/NSCalendarDate+misc.h>
|
#import <NGExtensions/NSCalendarDate+misc.h>
|
||||||
#import <NGExtensions/NSObject+Logs.h>
|
#import <NGExtensions/NSObject+Logs.h>
|
||||||
#import <NGExtensions/NSString+misc.h>
|
#import <NGExtensions/NSString+misc.h>
|
||||||
|
@ -766,6 +767,73 @@ iRANGE(2);
|
||||||
return attachUrl;
|
return attachUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSDictionary *) organizerProfile
|
||||||
|
{
|
||||||
|
NSMutableDictionary *profile;
|
||||||
|
NSDictionary *ownerIdentity;
|
||||||
|
NSString *uid, *name, *email, *partstat, *role;
|
||||||
|
SOGoUserManager *um;
|
||||||
|
SOGoCalendarComponent *co;
|
||||||
|
SOGoUser *ownerUser;
|
||||||
|
|
||||||
|
if (organizerProfile == nil)
|
||||||
|
{
|
||||||
|
profile = [NSMutableDictionary dictionary];
|
||||||
|
email = [organizer rfc822Email];
|
||||||
|
role = nil;
|
||||||
|
partstat = nil;
|
||||||
|
|
||||||
|
if ([email length])
|
||||||
|
{
|
||||||
|
um = [SOGoUserManager sharedUserManager];
|
||||||
|
|
||||||
|
name = [organizer cn];
|
||||||
|
uid = [um getUIDForEmail: email];
|
||||||
|
|
||||||
|
partstat = [[organizer partStat] lowercaseString];
|
||||||
|
role = [[organizer role] lowercaseString];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// No organizer defined in vEvent; use calendar owner
|
||||||
|
co = [self clientObject];
|
||||||
|
uid = [[co container] ownerInContext: context];
|
||||||
|
ownerUser = [SOGoUser userWithLogin: uid roles: nil];
|
||||||
|
ownerIdentity = [ownerUser defaultIdentity];
|
||||||
|
|
||||||
|
name = [ownerIdentity objectForKey: @"fullName"];
|
||||||
|
email = [ownerIdentity objectForKey: @"email"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (uid != nil)
|
||||||
|
[profile setObject: uid
|
||||||
|
forKey: @"uid"];
|
||||||
|
else
|
||||||
|
uid = email;
|
||||||
|
|
||||||
|
[profile setObject: name
|
||||||
|
forKey: @"name"];
|
||||||
|
|
||||||
|
[profile setObject: email
|
||||||
|
forKey: @"email"];
|
||||||
|
|
||||||
|
if (partstat == nil || ![partstat length])
|
||||||
|
partstat = @"accepted";
|
||||||
|
[profile setObject: partstat
|
||||||
|
forKey: @"partstat"];
|
||||||
|
|
||||||
|
if (role == nil || ![role length])
|
||||||
|
role = @"chair";
|
||||||
|
[profile setObject: role
|
||||||
|
forKey: @"role"];
|
||||||
|
|
||||||
|
organizerProfile = [NSDictionary dictionaryWithObject: profile forKey: uid];
|
||||||
|
[organizerProfile retain];
|
||||||
|
}
|
||||||
|
|
||||||
|
return organizerProfile;
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString *) organizerName
|
- (NSString *) organizerName
|
||||||
{
|
{
|
||||||
NSDictionary *profile;
|
NSDictionary *profile;
|
||||||
|
@ -775,6 +843,11 @@ iRANGE(2);
|
||||||
return [profile objectForKey: @"name"];
|
return [profile objectForKey: @"name"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *) jsonOrganizer
|
||||||
|
{
|
||||||
|
return [[[[self organizerProfile] allValues] lastObject] jsonRepresentation];
|
||||||
|
}
|
||||||
|
|
||||||
// - (BOOL) canBeOrganizer
|
// - (BOOL) canBeOrganizer
|
||||||
// {
|
// {
|
||||||
// NSString *owner;
|
// NSString *owner;
|
||||||
|
@ -904,78 +977,6 @@ iRANGE(2);
|
||||||
return [jsonAttendees jsonRepresentation];
|
return [jsonAttendees jsonRepresentation];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDictionary *) organizerProfile
|
|
||||||
{
|
|
||||||
NSMutableDictionary *profile;
|
|
||||||
NSDictionary *ownerIdentity;
|
|
||||||
NSString *uid, *name, *email, *partstat, *role;
|
|
||||||
SOGoUserManager *um;
|
|
||||||
SOGoCalendarComponent *co;
|
|
||||||
SOGoUser *ownerUser;
|
|
||||||
|
|
||||||
if (organizerProfile == nil)
|
|
||||||
{
|
|
||||||
profile = [NSMutableDictionary dictionary];
|
|
||||||
email = [organizer rfc822Email];
|
|
||||||
role = nil;
|
|
||||||
partstat = nil;
|
|
||||||
|
|
||||||
if ([email length])
|
|
||||||
{
|
|
||||||
um = [SOGoUserManager sharedUserManager];
|
|
||||||
|
|
||||||
name = [organizer cn];
|
|
||||||
uid = [um getUIDForEmail: email];
|
|
||||||
|
|
||||||
partstat = [[organizer partStat] lowercaseString];
|
|
||||||
role = [[organizer role] lowercaseString];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// No organizer defined in vEvent; use calendar owner
|
|
||||||
co = [self clientObject];
|
|
||||||
uid = [[co container] ownerInContext: context];
|
|
||||||
ownerUser = [SOGoUser userWithLogin: uid roles: nil];
|
|
||||||
ownerIdentity = [ownerUser defaultIdentity];
|
|
||||||
|
|
||||||
name = [ownerIdentity objectForKey: @"fullName"];
|
|
||||||
email = [ownerIdentity objectForKey: @"email"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uid != nil)
|
|
||||||
[profile setObject: uid
|
|
||||||
forKey: @"uid"];
|
|
||||||
else
|
|
||||||
uid = email;
|
|
||||||
|
|
||||||
[profile setObject: name
|
|
||||||
forKey: @"name"];
|
|
||||||
|
|
||||||
[profile setObject: email
|
|
||||||
forKey: @"email"];
|
|
||||||
|
|
||||||
if (partstat == nil || ![partstat length])
|
|
||||||
partstat = @"accepted";
|
|
||||||
[profile setObject: partstat
|
|
||||||
forKey: @"partstat"];
|
|
||||||
|
|
||||||
if (role == nil || ![role length])
|
|
||||||
role = @"chair";
|
|
||||||
[profile setObject: role
|
|
||||||
forKey: @"role"];
|
|
||||||
|
|
||||||
organizerProfile = [NSDictionary dictionaryWithObject: profile forKey: uid];
|
|
||||||
[organizerProfile retain];
|
|
||||||
}
|
|
||||||
|
|
||||||
return organizerProfile;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSString *) jsonOrganizer
|
|
||||||
{
|
|
||||||
return [[[[self organizerProfile] allValues] lastObject] jsonRepresentation];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) setLocation: (NSString *) _value
|
- (void) setLocation: (NSString *) _value
|
||||||
{
|
{
|
||||||
ASSIGN (location, _value);
|
ASSIGN (location, _value);
|
||||||
|
@ -1918,12 +1919,7 @@ RANGE(2);
|
||||||
else if (range == 2)
|
else if (range == 2)
|
||||||
{
|
{
|
||||||
NSCalendarDate *date;
|
NSCalendarDate *date;
|
||||||
SOGoUserDefaults *ud;
|
|
||||||
NSDictionary *locale;
|
|
||||||
|
|
||||||
ud = [[context activeUser] userDefaults];
|
|
||||||
locale = [[self resourceManager]
|
|
||||||
localeForLanguageNamed: [ud language]];
|
|
||||||
date = [NSCalendarDate dateWithString: [self range2]
|
date = [NSCalendarDate dateWithString: [self range2]
|
||||||
calendarFormat: dateFormat
|
calendarFormat: dateFormat
|
||||||
locale: locale];
|
locale: locale];
|
||||||
|
|
|
@ -392,10 +392,8 @@
|
||||||
{
|
{
|
||||||
NSString *newCalendar;
|
NSString *newCalendar;
|
||||||
SOGoAppointmentFolder *thisFolder, *newFolder;
|
SOGoAppointmentFolder *thisFolder, *newFolder;
|
||||||
SOGoAppointmentFolders *parentFolder;
|
|
||||||
SOGoTaskObject *co;
|
SOGoTaskObject *co;
|
||||||
SoSecurityManager *sm;
|
SoSecurityManager *sm;
|
||||||
NSException *ex;
|
|
||||||
|
|
||||||
co = [self clientObject];
|
co = [self clientObject];
|
||||||
[co saveComponent: todo];
|
[co saveComponent: todo];
|
||||||
|
@ -410,14 +408,13 @@
|
||||||
onObject: thisFolder
|
onObject: thisFolder
|
||||||
inContext: context])
|
inContext: context])
|
||||||
{
|
{
|
||||||
parentFolder = [[self container] container];
|
|
||||||
newFolder = [[thisFolder container] lookupName: newCalendar
|
newFolder = [[thisFolder container] lookupName: newCalendar
|
||||||
inContext: context
|
inContext: context
|
||||||
acquire: NO];
|
acquire: NO];
|
||||||
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
|
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
|
||||||
onObject: newFolder
|
onObject: newFolder
|
||||||
inContext: context])
|
inContext: context])
|
||||||
ex = [co moveToFolder: newFolder];
|
[co moveToFolder: newFolder];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue