From 6d8c3289104e03102d03a202ecec5d898771f768 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 22 Oct 2012 10:09:13 -0400 Subject: [PATCH] Fixed most build warnings --- Main/SOGo.m | 1 + .../Appointments/SOGoAppointmentFolder.m | 14 +- .../Appointments/SOGoAppointmentFolders.m | 1 + SoObjects/Appointments/SOGoAptMailDeletion.m | 4 + SoObjects/Appointments/SOGoAptMailICalReply.m | 3 + .../Appointments/SOGoAptMailInvitation.m | 6 +- SoObjects/Appointments/SOGoAptMailUpdate.m | 23 +-- SoObjects/Appointments/SOGoCalendarProxy.m | 1 + .../Appointments/SOGoComponentOccurence.m | 1 + .../SOGoUserFolder+Appointments.m | 1 + SoObjects/Appointments/iCalCalendar+SOGo.m | 3 +- SoObjects/Appointments/iCalPerson+SOGo.m | 4 +- SoObjects/Contacts/SOGoContactEntryPhoto.m | 1 + SoObjects/Contacts/SOGoContactFolders.m | 6 +- SoObjects/Contacts/SOGoContactSourceFolder.m | 11 +- SoObjects/Mailer/EOQualifier+MailDAV.h | 2 +- SoObjects/Mailer/EOQualifier+MailDAV.m | 4 +- SoObjects/Mailer/SOGoMailAccount.m | 1 + SoObjects/Mailer/SOGoMailBaseObject.m | 3 + SoObjects/Mailer/SOGoMailBodyPart.m | 1 + SoObjects/Mailer/SOGoMailFolder.m | 21 +-- SoObjects/Mailer/SOGoUser+Mailer.m | 1 + SoObjects/SOGo/DOMNode+SOGo.h | 6 +- SoObjects/SOGo/DOMNode+SOGo.m | 13 +- SoObjects/SOGo/SOGoDefaultsSource.m | 3 +- SoObjects/SOGo/SOGoGCSFolder.h | 6 +- SoObjects/SOGo/SOGoGCSFolder.m | 28 ++-- SoObjects/SOGo/SOGoParentFolder.m | 4 +- SoObjects/SOGo/SOGoPublicBaseFolder.m | 1 + SoObjects/SOGo/WORequest+SOGo.m | 10 +- Tools/SOGoEAlarmsNotifier.m | 1 + Tools/SOGoSockD.h | 3 +- Tools/SOGoToolRemoveDoubles.m | 3 +- Tools/SOGoToolRestore.m | 9 +- UI/Common/UIxFolderActions.m | 2 - UI/Contacts/UIxContactActions.m | 2 + UI/Contacts/UIxContactEditor.h | 6 +- UI/Contacts/UIxContactEditor.m | 34 ++-- UI/MailPartViewers/UIxMailPartICalViewer.m | 1 + UI/MailPartViewers/UIxMailRenderingContext.m | 1 + UI/MailerUI/UIxMailEditor.m | 7 - UI/MailerUI/UIxMailFilterPanel.m | 2 + UI/MailerUI/UIxMailListActions.m | 1 + UI/MailerUI/UIxMailMainFrame.m | 4 +- UI/MailerUI/UIxMailMoveToPopUp.m | 2 + UI/MailerUI/UIxMailView.m | 1 + UI/PreferencesUI/UIxPreferences.m | 3 +- UI/SOGoUI/SOGoACLAdvisory.m | 2 +- UI/SOGoUI/SOGoFolderAdvisory.m | 2 +- UI/SOGoUI/UIxComponent.m | 6 +- UI/Scheduler/UIxAppointmentActions.m | 1 + UI/Scheduler/UIxCalDayTable.m | 4 - UI/Scheduler/UIxCalFolderActions.m | 3 + UI/Scheduler/UIxCalMonthView.m | 5 - UI/Scheduler/UIxComponentEditor.m | 150 +++++++++--------- UI/Scheduler/UIxTaskEditor.m | 9 +- 56 files changed, 238 insertions(+), 210 deletions(-) diff --git a/Main/SOGo.m b/Main/SOGo.m index 8fe51d242..d8bc89623 100644 --- a/Main/SOGo.m +++ b/Main/SOGo.m @@ -33,6 +33,7 @@ #import #import #import +#import #import #import diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 50cdd92f9..c4b761963 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -1481,7 +1481,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir [filter setObject: textMatch forKey: propName]; } -- (NSDictionary *) _parseCalendarFilter: (DOMElement *) filterElement +- (NSDictionary *) _parseCalendarFilter: (id ) filterElement { NSMutableDictionary *filterData; id parentNode; @@ -1536,10 +1536,10 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir return rc; } -- (NSArray *) _parseCalendarFilters: (DOMElement *) parentNode +- (NSArray *) _parseCalendarFilters: (id ) parentNode { id children; - DOMElement *element; + id element; NSMutableArray *filters; NSDictionary *filter; unsigned int count, max; @@ -1794,7 +1794,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir { WOResponse *r; id document; - DOMElement *documentElement, *propElement; + id documentElement, propElement; r = [context response]; [r prepareDAVResponse]; @@ -1802,9 +1802,9 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir @" xmlns:C=\"urn:ietf:params:xml:ns:caldav\">"]; document = [[context request] contentAsDOMDocument]; - documentElement = (DOMElement *) [document documentElement]; - propElement = [documentElement firstElementWithTag: @"prop" - inNamespace: XMLNS_WEBDAV]; + documentElement = (id ) [document documentElement]; + propElement = [(NGDOMNodeWithChildren *) documentElement + firstElementWithTag: @"prop" inNamespace: XMLNS_WEBDAV]; [self _appendComponentProperties: [self parseDAVRequestedProperties: propElement] matchingFilters: [self _parseCalendarFilters: documentElement] diff --git a/SoObjects/Appointments/SOGoAppointmentFolders.m b/SoObjects/Appointments/SOGoAppointmentFolders.m index b1ccd13dd..b2dde6b4d 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolders.m +++ b/SoObjects/Appointments/SOGoAppointmentFolders.m @@ -44,6 +44,7 @@ #import #import #import +#import #import #import #import diff --git a/SoObjects/Appointments/SOGoAptMailDeletion.m b/SoObjects/Appointments/SOGoAptMailDeletion.m index 75509c59d..70c9ddfc1 100644 --- a/SoObjects/Appointments/SOGoAptMailDeletion.m +++ b/SoObjects/Appointments/SOGoAptMailDeletion.m @@ -19,6 +19,10 @@ 02111-1307, USA. */ +#import + +#import + #import #import diff --git a/SoObjects/Appointments/SOGoAptMailICalReply.m b/SoObjects/Appointments/SOGoAptMailICalReply.m index e540c1d04..e8ebaf0c9 100644 --- a/SoObjects/Appointments/SOGoAptMailICalReply.m +++ b/SoObjects/Appointments/SOGoAptMailICalReply.m @@ -19,8 +19,11 @@ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + #import +#import + #import #import diff --git a/SoObjects/Appointments/SOGoAptMailInvitation.m b/SoObjects/Appointments/SOGoAptMailInvitation.m index 18b285afa..bfd709de0 100644 --- a/SoObjects/Appointments/SOGoAptMailInvitation.m +++ b/SoObjects/Appointments/SOGoAptMailInvitation.m @@ -19,9 +19,13 @@ 02111-1307, USA. */ -#import +#import #import +#import + +#import + #import #import #import diff --git a/SoObjects/Appointments/SOGoAptMailUpdate.m b/SoObjects/Appointments/SOGoAptMailUpdate.m index c88854da2..2c2009775 100644 --- a/SoObjects/Appointments/SOGoAptMailUpdate.m +++ b/SoObjects/Appointments/SOGoAptMailUpdate.m @@ -20,8 +20,11 @@ */ #import +#import #import +#import + #import #import @@ -59,7 +62,7 @@ } - (NSString *) valueForProperty: (NSString *) property - withDateFormatter: (SOGoDateFormatter *) dateFormatter + withDateFormatter: (SOGoDateFormatter *) _dateFormatter { static NSDictionary *valueTypes = nil; NSString *valueType; @@ -86,9 +89,9 @@ { [value setTimeZone: viewTZ]; if ([apt isAllDay]) - value = [dateFormatter formattedDate: value]; + value = [_dateFormatter formattedDate: value]; else - value = [dateFormatter formattedDateAndTime: value]; + value = [_dateFormatter formattedDateAndTime: value]; } } else @@ -97,7 +100,7 @@ return value; } -- (void) _setupBodyContentWithFormatter: (SOGoDateFormatter *) dateFormatter +- (void) _setupBodyContentWithFormatter: (SOGoDateFormatter *) _dateFormatter { NSString *property, *label, *value; NSArray *updatedProperties; @@ -111,7 +114,7 @@ { property = [updatedProperties objectAtIndex: count]; value = [self valueForProperty: property - withDateFormatter: dateFormatter]; + withDateFormatter: _dateFormatter]; /* Unhandled properties will return nil */ if (value) { @@ -157,21 +160,21 @@ - (void) setupValues { NSCalendarDate *date; - SOGoDateFormatter *dateFormatter; + SOGoDateFormatter *localDateFormatter; [super setupValues]; - dateFormatter = [[context activeUser] dateFormatterInContext: context]; + localDateFormatter = [[context activeUser] dateFormatterInContext: context]; date = [self oldStartDate]; - [values setObject: [dateFormatter shortFormattedDate: date] + [values setObject: [localDateFormatter shortFormattedDate: date] forKey: @"OldStartDate"]; if (![apt isAllDay]) - [values setObject: [dateFormatter formattedTime: date] + [values setObject: [localDateFormatter formattedTime: date] forKey: @"OldStartTime"]; - [self _setupBodyContentWithFormatter: dateFormatter]; + [self _setupBodyContentWithFormatter: localDateFormatter]; } - (NSString *) getSubject diff --git a/SoObjects/Appointments/SOGoCalendarProxy.m b/SoObjects/Appointments/SOGoCalendarProxy.m index 9d2b22446..ca2a6a2cf 100644 --- a/SoObjects/Appointments/SOGoCalendarProxy.m +++ b/SoObjects/Appointments/SOGoCalendarProxy.m @@ -28,6 +28,7 @@ #import #import #import +#import #import #import diff --git a/SoObjects/Appointments/SOGoComponentOccurence.m b/SoObjects/Appointments/SOGoComponentOccurence.m index 938f76541..97c9b1138 100644 --- a/SoObjects/Appointments/SOGoComponentOccurence.m +++ b/SoObjects/Appointments/SOGoComponentOccurence.m @@ -27,6 +27,7 @@ #import #import +#import #import #import diff --git a/SoObjects/Appointments/SOGoUserFolder+Appointments.m b/SoObjects/Appointments/SOGoUserFolder+Appointments.m index 65038f553..cc31f195a 100644 --- a/SoObjects/Appointments/SOGoUserFolder+Appointments.m +++ b/SoObjects/Appointments/SOGoUserFolder+Appointments.m @@ -37,6 +37,7 @@ #import #import #import +#import #import #import #import diff --git a/SoObjects/Appointments/iCalCalendar+SOGo.m b/SoObjects/Appointments/iCalCalendar+SOGo.m index d50d30c1d..466c47291 100644 --- a/SoObjects/Appointments/iCalCalendar+SOGo.m +++ b/SoObjects/Appointments/iCalCalendar+SOGo.m @@ -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 * @@ -21,6 +21,7 @@ */ #import +#import #import #import diff --git a/SoObjects/Appointments/iCalPerson+SOGo.m b/SoObjects/Appointments/iCalPerson+SOGo.m index b7dc8e941..e3473c969 100644 --- a/SoObjects/Appointments/iCalPerson+SOGo.m +++ b/SoObjects/Appointments/iCalPerson+SOGo.m @@ -21,9 +21,11 @@ * Boston, MA 02111-1307, USA. */ +#import #import -#import #import +#import +#import #import "iCalPerson+SOGo.h" diff --git a/SoObjects/Contacts/SOGoContactEntryPhoto.m b/SoObjects/Contacts/SOGoContactEntryPhoto.m index 7f571ca98..0cbf83cf6 100644 --- a/SoObjects/Contacts/SOGoContactEntryPhoto.m +++ b/SoObjects/Contacts/SOGoContactEntryPhoto.m @@ -21,6 +21,7 @@ */ #import +#import #import #import diff --git a/SoObjects/Contacts/SOGoContactFolders.m b/SoObjects/Contacts/SOGoContactFolders.m index 57aa27ab4..c10f88c66 100644 --- a/SoObjects/Contacts/SOGoContactFolders.m +++ b/SoObjects/Contacts/SOGoContactFolders.m @@ -311,7 +311,7 @@ { SOGoUser *ownerUser; NSMutableArray *categories; - DOMElement *documentElement, *catNode; + id documentElement, catNode; id document; id catNodes; NSUInteger count, max; @@ -322,14 +322,14 @@ if ([newCategories length] > 0) { document = [[context request] contentAsDOMDocument]; - documentElement = (DOMElement *) [document documentElement]; + documentElement = [document documentElement]; catNodes = [documentElement getElementsByTagName: @"category"]; max = [catNodes length]; for (count = 0; count < max; count++) { catNode = [catNodes objectAtIndex: count]; if ([catNode hasChildNodes]) - [categories addObject: [catNode textValue]]; + [categories addObject: [(NGDOMNode *) catNode textValue]]; } } diff --git a/SoObjects/Contacts/SOGoContactSourceFolder.m b/SoObjects/Contacts/SOGoContactSourceFolder.m index 260a7ce35..b270460c1 100644 --- a/SoObjects/Contacts/SOGoContactSourceFolder.m +++ b/SoObjects/Contacts/SOGoContactSourceFolder.m @@ -598,7 +598,7 @@ { WOResponse *r; id document; - DOMElement *documentElement, *propElement; + id documentElement, propElement; r = [context response]; [r prepareDAVResponse]; @@ -606,10 +606,11 @@ [NSString stringWithFormat: @"", namespace]]; document = [[queryContext request] contentAsDOMDocument]; - documentElement = (DOMElement *) [document documentElement]; - propElement = [documentElement firstElementWithTag: @"prop" - inNamespace: @"DAV:"]; - [self _appendComponentProperties: [propElement flatPropertyNameOfSubElements] + documentElement = [document documentElement]; + propElement = [(NGDOMNodeWithChildren *) documentElement + firstElementWithTag: @"prop" + inNamespace: @"DAV:"]; + [self _appendComponentProperties: [(NGDOMNodeWithChildren *) propElement flatPropertyNameOfSubElements] matchingURLs: [documentElement getElementsByTagName: @"href"] toResponse: r]; [r appendContentString:@""]; diff --git a/SoObjects/Mailer/EOQualifier+MailDAV.h b/SoObjects/Mailer/EOQualifier+MailDAV.h index f779ca865..21a7b49e5 100644 --- a/SoObjects/Mailer/EOQualifier+MailDAV.h +++ b/SoObjects/Mailer/EOQualifier+MailDAV.h @@ -30,7 +30,7 @@ @interface EOQualifier (SOGoMailDAVExtension) -+ (id) qualifierFromMailDAVMailFilters: (DOMElement *) mailFilters; ++ (id) qualifierFromMailDAVMailFilters: (id ) mailFilters; @end diff --git a/SoObjects/Mailer/EOQualifier+MailDAV.m b/SoObjects/Mailer/EOQualifier+MailDAV.m index b7a910004..0030f0b9d 100644 --- a/SoObjects/Mailer/EOQualifier+MailDAV.m +++ b/SoObjects/Mailer/EOQualifier+MailDAV.m @@ -35,14 +35,14 @@ @implementation EOQualifier (SOGoMailDAVExtension) -+ (id) qualifierFromMailDAVMailFilters: (DOMElement *) mailFilters ++ (id) qualifierFromMailDAVMailFilters: (id ) mailFilters { EOQualifier *qualifier; NSMutableArray *args, *formats; NSArray *flags, *strings, *dates; NSString *valueA, *valueB, *tagName, *format, *negate; id list; - DOMElement *current; + id current; NSCalendarDate *startDate, *endDate; int count, max; BOOL datesAreEqual; diff --git a/SoObjects/Mailer/SOGoMailAccount.m b/SoObjects/Mailer/SOGoMailAccount.m index cbb8315d8..37b9e08c5 100644 --- a/SoObjects/Mailer/SOGoMailAccount.m +++ b/SoObjects/Mailer/SOGoMailAccount.m @@ -43,6 +43,7 @@ #import #import #import +#import #import #import "SOGoDraftsFolder.h" diff --git a/SoObjects/Mailer/SOGoMailBaseObject.m b/SoObjects/Mailer/SOGoMailBaseObject.m index aa324fb6f..7053b19f7 100644 --- a/SoObjects/Mailer/SOGoMailBaseObject.m +++ b/SoObjects/Mailer/SOGoMailBaseObject.m @@ -25,12 +25,15 @@ #import #import +#import #import #import #import #import +#import #import +#import #import "SOGoMailAccount.h" #import "SOGoMailManager.h" diff --git a/SoObjects/Mailer/SOGoMailBodyPart.m b/SoObjects/Mailer/SOGoMailBodyPart.m index 9728eadce..d2f5fdcdd 100644 --- a/SoObjects/Mailer/SOGoMailBodyPart.m +++ b/SoObjects/Mailer/SOGoMailBodyPart.m @@ -23,6 +23,7 @@ #import #import #import +#import #import #import diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index dbc7fc2df..8d2290a4c 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -1494,7 +1494,7 @@ static NSString *defaultUserID = @"anyone"; return davIMAPFieldsTable; } -- (BOOL) _sortElementIsAscending: (DOMElement *) sortElement +- (BOOL) _sortElementIsAscending: (NGDOMNodeWithChildren *) sortElement { NSString *davReverseAttr; BOOL orderIsAscending; @@ -1512,7 +1512,7 @@ static NSString *defaultUserID = @"anyone"; return orderIsAscending; } -- (NSArray *) _sortOrderingsFromSortElement: (DOMElement *) sortElement +- (NSArray *) _sortOrderingsFromSortElement: (NGDOMNodeWithChildren *) sortElement { static NSMutableDictionary *criteriasMap = nil; NSArray *davSortCriterias; @@ -1727,7 +1727,7 @@ static NSString *defaultUserID = @"anyone"; return davIMAPFields; } -- (NSDictionary *) parseDAVRequestedProperties: (DOMElement *) propElement +- (NSDictionary *) parseDAVRequestedProperties: (NGDOMNodeWithChildren *) propElement { NSArray *properties; NSDictionary *imapFieldsTable; @@ -1747,7 +1747,8 @@ static NSString *defaultUserID = @"anyone"; { WOResponse *r; id document; - DOMElement *documentElement, *propElement, *filterElement, *sortElement; + id filterElement; + NGDOMNodeWithChildren *documentElement, *propElement, *sortElement; NSDictionary *properties; NSArray *messages, *sortOrderings; EOQualifier *searchQualifier; @@ -1756,17 +1757,19 @@ static NSString *defaultUserID = @"anyone"; [r prepareDAVResponse]; document = [[context request] contentAsDOMDocument]; - documentElement = (DOMElement *) [document documentElement]; + documentElement = [document documentElement]; - propElement = [documentElement firstElementWithTag: @"prop" - inNamespace: XMLNS_WEBDAV]; + propElement = (NGDOMNodeWithChildren *) [documentElement + firstElementWithTag: @"prop" + inNamespace: XMLNS_WEBDAV]; properties = [self parseDAVRequestedProperties: propElement]; filterElement = [documentElement firstElementWithTag: @"mail-filters" inNamespace: XMLNS_INVERSEDAV]; searchQualifier = [EOQualifier qualifierFromMailDAVMailFilters: filterElement]; - sortElement = [documentElement firstElementWithTag: @"sort" - inNamespace: XMLNS_INVERSEDAV]; + sortElement = (NGDOMNodeWithChildren *) [documentElement + firstElementWithTag: @"sort" + inNamespace: XMLNS_INVERSEDAV]; sortOrderings = [self _sortOrderingsFromSortElement: sortElement]; messages = [self _fetchMessageProperties: [properties allKeys] diff --git a/SoObjects/Mailer/SOGoUser+Mailer.m b/SoObjects/Mailer/SOGoUser+Mailer.m index c96ce8abf..71591cfc9 100644 --- a/SoObjects/Mailer/SOGoUser+Mailer.m +++ b/SoObjects/Mailer/SOGoUser+Mailer.m @@ -20,6 +20,7 @@ * Boston, MA 02111-1307, USA. */ +#import #import #import diff --git a/SoObjects/SOGo/DOMNode+SOGo.h b/SoObjects/SOGo/DOMNode+SOGo.h index 2906058e8..731bf7e36 100644 --- a/SoObjects/SOGo/DOMNode+SOGo.h +++ b/SoObjects/SOGo/DOMNode+SOGo.h @@ -41,9 +41,9 @@ - (id ) childElementsWithTag: (NSString *) tagName inNamespace: (NSString *) namespace; -- (DOMElement *) firstElementWithTag: (NSString *) tagName; -- (DOMElement *) firstElementWithTag: (NSString *) tagName - inNamespace: (NSString *) namespace; +- (id ) firstElementWithTag: (NSString *) tagName; +- (id ) firstElementWithTag: (NSString *) tagName + inNamespace: (NSString *) namespace; - (NSArray *) flatPropertyNameOfSubElements; diff --git a/SoObjects/SOGo/DOMNode+SOGo.m b/SoObjects/SOGo/DOMNode+SOGo.m index f18299c34..70295f478 100644 --- a/SoObjects/SOGo/DOMNode+SOGo.m +++ b/SoObjects/SOGo/DOMNode+SOGo.m @@ -87,11 +87,11 @@ return [self childElementsWithTag: tagName inNamespace: nil]; } -- (DOMElement *) firstElementWithTag: (NSString *) tagName - inNamespace: (NSString *) namespace +- (id ) firstElementWithTag: (NSString *) tagName + inNamespace: (NSString *) namespace { id nodes; - DOMElement *node, *currentElement; + id node, currentElement; unsigned int count, max; node = nil; @@ -111,7 +111,7 @@ return node; } -- (DOMElement *) firstElementWithTag: (NSString *) tagName +- (id ) firstElementWithTag: (NSString *) tagName { return [self firstElementWithTag: tagName inNamespace: nil]; } @@ -120,7 +120,7 @@ { NSMutableArray *propertyNames; id children; - DOMElement *currentElement; + id currentElement; unsigned int count, max; propertyNames = [NSMutableArray array]; @@ -131,7 +131,8 @@ { currentElement = [children objectAtIndex: count]; if ([currentElement nodeType] == DOM_ELEMENT_NODE) - [propertyNames addObject: [currentElement asPropertyName]]; + [propertyNames + addObject: [(NGDOMElement *) currentElement asPropertyName]]; } return propertyNames; diff --git a/SoObjects/SOGo/SOGoDefaultsSource.m b/SoObjects/SOGo/SOGoDefaultsSource.m index 3deaf51a0..15ce69b67 100644 --- a/SoObjects/SOGo/SOGoDefaultsSource.m +++ b/SoObjects/SOGo/SOGoDefaultsSource.m @@ -318,7 +318,7 @@ static Class NSStringKlass = Nil; - (BOOL) migrateOldDefaultsWithDictionary: (NSDictionary *) migratedKeys { NSArray *allKeys; - id currentValue, existingValue; + id currentValue; NSString *oldName, *newName; int count, max; BOOL requireSync; @@ -334,7 +334,6 @@ static Class NSStringKlass = Nil; if (currentValue) { newName = [migratedKeys objectForKey: oldName]; - existingValue = [source objectForKey: newName]; requireSync = YES; [source setObject: currentValue forKey: newName]; [source removeObjectForKey: oldName]; diff --git a/SoObjects/SOGo/SOGoGCSFolder.h b/SoObjects/SOGo/SOGoGCSFolder.h index 74f7da5a6..9eab2ff90 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.h +++ b/SoObjects/SOGo/SOGoGCSFolder.h @@ -34,10 +34,10 @@ @class WOContext; @class WOResponse; -@class DOMElement; - @class SOGoUser; +@protocol DOMElement; + /* SOGoGCSFolder @@ -121,7 +121,7 @@ - (NSURL *) realDavURL; - (NSDictionary *) davSQLFieldsTable; -- (NSDictionary *) parseDAVRequestedProperties: (DOMElement *) propElement; +- (NSDictionary *) parseDAVRequestedProperties: (id ) propElement; - (NSString *) davCollectionTag; diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 188f9e742..13a02abc0 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -1041,12 +1041,12 @@ static NSArray *childRecordFields = nil; return davSQLFields; } -- (NSDictionary *) parseDAVRequestedProperties: (DOMElement *) propElement +- (NSDictionary *) parseDAVRequestedProperties: (id ) propElement { NSArray *properties; NSDictionary *sqlFieldsTable; - properties = [propElement flatPropertyNameOfSubElements]; + properties = [(NGDOMNodeWithChildren *) propElement flatPropertyNameOfSubElements]; sqlFieldsTable = [self _davSQLFieldsForProperties: properties]; return sqlFieldsTable; @@ -1331,7 +1331,7 @@ static NSArray *childRecordFields = nil; { WOResponse *r; id document; - DOMElement *documentElement, *propElement; + id documentElement, propElement; NSString *syncToken; NSDictionary *properties; NSArray *records; @@ -1340,13 +1340,16 @@ static NSArray *childRecordFields = nil; [r prepareDAVResponse]; document = [[context request] contentAsDOMDocument]; - documentElement = (DOMElement *) [document documentElement]; - syncToken = [[documentElement firstElementWithTag: @"sync-token" - inNamespace: XMLNS_WEBDAV] textValue]; + documentElement = [document documentElement]; + syncToken = [(NGDOMNode *) + [(NGDOMNodeWithChildren *) + documentElement firstElementWithTag: @"sync-token" + inNamespace: XMLNS_WEBDAV] + textValue]; if ([self _isValidSyncToken: syncToken]) { - propElement = [documentElement firstElementWithTag: @"prop" - inNamespace: XMLNS_WEBDAV]; + propElement = [(NGDOMNodeWithChildren *) documentElement + firstElementWithTag: @"prop" inNamespace: XMLNS_WEBDAV]; properties = [self parseDAVRequestedProperties: propElement]; records = [self _fetchSyncTokenFields: properties matchingSyncToken: syncToken]; @@ -2089,7 +2092,7 @@ static NSArray *childRecordFields = nil; { WOResponse *r; id document; - DOMElement *documentElement, *propElement; + id documentElement, propElement; r = [context response]; [r prepareDAVResponse]; @@ -2097,9 +2100,10 @@ static NSArray *childRecordFields = nil; [NSString stringWithFormat: @"", namespace]]; document = [[queryContext request] contentAsDOMDocument]; - documentElement = (DOMElement *) [document documentElement]; - propElement = [documentElement firstElementWithTag: @"prop" - inNamespace: @"DAV:"]; + documentElement = [document documentElement]; + propElement = [(NGDOMNodeWithChildren *) + documentElement firstElementWithTag: @"prop" + inNamespace: @"DAV:"]; [self _appendComponentProperties: [self parseDAVRequestedProperties: propElement] matchingURLs: [documentElement getElementsByTagName: @"href"] toResponse: r]; diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index 8da1f1412..a3cb35394 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -576,7 +576,7 @@ static SoSecurityManager *sm = nil; { NSMutableArray *supportedTypes; id children; - DOMElement *element; + id element; NSException *error; NSArray *allTypes; id o; @@ -616,7 +616,7 @@ static SoSecurityManager *sm = nil; { element = [children objectAtIndex: i]; - if ([element nodeType] == DOM_ELEMENT_NODE && + if ([element nodeType] == DOM_ELEMENT_NODE && ![supportedTypes containsObject: [element nodeName]]) supported = NO; } diff --git a/SoObjects/SOGo/SOGoPublicBaseFolder.m b/SoObjects/SOGo/SOGoPublicBaseFolder.m index 7f9c7a33e..53bec7d6b 100644 --- a/SoObjects/SOGo/SOGoPublicBaseFolder.m +++ b/SoObjects/SOGo/SOGoPublicBaseFolder.m @@ -23,6 +23,7 @@ #import #import "SOGoUser.h" +#import "SOGoUserFolder.h" #import "SOGoPublicBaseFolder.h" diff --git a/SoObjects/SOGo/WORequest+SOGo.m b/SoObjects/SOGo/WORequest+SOGo.m index d554bd5a0..c9474a96b 100644 --- a/SoObjects/SOGo/WORequest+SOGo.m +++ b/SoObjects/SOGo/WORequest+SOGo.m @@ -170,12 +170,10 @@ cc = [self clientCapabilities]; - b = [[cc userAgent] rangeOfString: @"CFNetwork"].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: @"AddressBook"].location != NSNotFound; - + b = ([[cc userAgent] rangeOfString: @"CFNetwork"].location != NSNotFound + && ([[cc userAgent] rangeOfString: @"Darwin"].location != NSNotFound + || [[cc userAgent] rangeOfString: @"Mac OS X"].location != NSNotFound) + && [[cc userAgent] rangeOfString: @"AddressBook"].location != NSNotFound); return b; } diff --git a/Tools/SOGoEAlarmsNotifier.m b/Tools/SOGoEAlarmsNotifier.m index cec6e425c..a8906c60a 100644 --- a/Tools/SOGoEAlarmsNotifier.m +++ b/Tools/SOGoEAlarmsNotifier.m @@ -24,6 +24,7 @@ #import #import +#import #import #import diff --git a/Tools/SOGoSockD.h b/Tools/SOGoSockD.h index 6abe2ee12..cd5c2993a 100644 --- a/Tools/SOGoSockD.h +++ b/Tools/SOGoSockD.h @@ -24,11 +24,10 @@ #define SOGOSOCKD_H #import +#import @class NGPassiveSocket; -@protocol RunLoopEvents; - @interface SOGoSockD : NSObject { NGPassiveSocket *listeningSocket; diff --git a/Tools/SOGoToolRemoveDoubles.m b/Tools/SOGoToolRemoveDoubles.m index 79ab21bd5..c26254a6a 100644 --- a/Tools/SOGoToolRemoveDoubles.m +++ b/Tools/SOGoToolRemoveDoubles.m @@ -24,6 +24,7 @@ #import #import +#import #import #import #import @@ -511,7 +512,7 @@ rc = NO; } - return NO; + return rc; } - (BOOL) processFolder: (NSString *) folderId diff --git a/Tools/SOGoToolRestore.m b/Tools/SOGoToolRestore.m index 462773d38..3b19fff7c 100644 --- a/Tools/SOGoToolRestore.m +++ b/Tools/SOGoToolRestore.m @@ -348,9 +348,8 @@ typedef enum SOGoToolRestoreMode { { NSDictionary *existingRecords, *currentRecord; NSString *cName, *cContent; - NSException *ex; - - int count, max, version; + int count, max; + unsigned int version; BOOL rc; if (records) @@ -367,8 +366,8 @@ typedef enum SOGoToolRestoreMode { { NSLog (@"restoring record '%@'", cName); cContent = [currentRecord objectForKey: @"c_content"]; - ex = [gcsFolder writeContent: cContent toName: cName - baseVersion: &version]; + [gcsFolder writeContent: cContent toName: cName + baseVersion: &version]; } } } diff --git a/UI/Common/UIxFolderActions.m b/UI/Common/UIxFolderActions.m index 9e9ffb47a..76a2bbe37 100644 --- a/UI/Common/UIxFolderActions.m +++ b/UI/Common/UIxFolderActions.m @@ -244,11 +244,9 @@ SOGoGCSFolder *sourceFolder, *destinationFolder; SOGoParentFolder *folders; SoSecurityManager *sm; - WORequest *request; unsigned int errorCount; sm = [SoSecurityManager sharedSecurityManager]; - request = [context request]; ex = nil; errorCount = 0; diff --git a/UI/Contacts/UIxContactActions.m b/UI/Contacts/UIxContactActions.m index 4ed09e295..b1d9e1269 100644 --- a/UI/Contacts/UIxContactActions.m +++ b/UI/Contacts/UIxContactActions.m @@ -23,8 +23,10 @@ #import #import +#import #import #import +#import #import diff --git a/UI/Contacts/UIxContactEditor.h b/UI/Contacts/UIxContactEditor.h index e01c07767..3f322dfb7 100644 --- a/UI/Contacts/UIxContactEditor.h +++ b/UI/Contacts/UIxContactEditor.h @@ -27,14 +27,14 @@ @class NSString; @class NSMutableDictionary; -@class SOGoContactFolder; +@protocol SOGoContactFolder; @interface UIxContactEditor : UIxComponent { id addressBookItem; NSString *item; NSMutableDictionary *ldifRecord; /* contains the values for editing */ - SOGoContactFolder *componentAddressBook; + id componentAddressBook; } - (NSMutableDictionary *) ldifRecord; @@ -44,7 +44,7 @@ - (BOOL) isNew; - (NSArray *) addressBooksList; -- (SOGoContactFolder *) componentAddressBook; +- (id ) componentAddressBook; - (NSString *) addressBookDisplayName; @end diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index b73125d1a..8179c51d2 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -185,7 +185,7 @@ static Class SOGoContactGCSEntryK = Nil; NSMutableArray *addressBooksList; SoSecurityManager *sm; SOGoContactFolders *folderContainer; - SOGoContactFolder *folder, *currentFolder; + id folder, currentFolder; addressBooksList = [NSMutableArray array]; sm = [SoSecurityManager sharedSecurityManager]; @@ -207,16 +207,12 @@ static Class SOGoContactGCSEntryK = Nil; return addressBooksList; } -- (SOGoContactFolder *) componentAddressBook +- (id ) componentAddressBook { - SOGoContactFolder *folder; - - folder = [[self clientObject] container]; - - return folder; + return [[self clientObject] container]; } -- (void) setComponentAddressBook: (SOGoContactFolder *) _componentAddressBook +- (void) setComponentAddressBook: (id ) _componentAddressBook { ASSIGN (componentAddressBook, _componentAddressBook); } @@ -224,7 +220,7 @@ static Class SOGoContactGCSEntryK = Nil; - (NSString *) addressBookDisplayName { NSString *fDisplayName; - SOGoContactFolder *folder; + SOGoObject *folder; SOGoContactFolders *parentFolder; fDisplayName = [addressBookItem displayName]; @@ -372,15 +368,19 @@ static Class SOGoContactGCSEntryK = Nil; if (componentAddressBook && componentAddressBook != [self componentAddressBook]) { - sm = [SoSecurityManager sharedSecurityManager]; - if (![sm validatePermission: SoPerm_DeleteObjects - onObject: componentAddressBook - inContext: context]) + if ([contact isKindOfClass: SOGoContactGCSEntryK]) { - if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles - onObject: componentAddressBook - inContext: context]) - [contact moveToFolder: (SOGoGCSFolder *)componentAddressBook]; // TODO: handle exception + sm = [SoSecurityManager sharedSecurityManager]; + if (![sm validatePermission: SoPerm_DeleteObjects + onObject: componentAddressBook + inContext: context] + && ![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles + onObject: componentAddressBook + inContext: context]) + [(SOGoContactGCSEntry *) contact + moveToFolder: (SOGoGCSFolder *)componentAddressBook]; // TODO: + // handle + // exception } } diff --git a/UI/MailPartViewers/UIxMailPartICalViewer.m b/UI/MailPartViewers/UIxMailPartICalViewer.m index de2cfc058..66259a2bf 100644 --- a/UI/MailPartViewers/UIxMailPartICalViewer.m +++ b/UI/MailPartViewers/UIxMailPartICalViewer.m @@ -26,6 +26,7 @@ */ #import +#import #import #import diff --git a/UI/MailPartViewers/UIxMailRenderingContext.m b/UI/MailPartViewers/UIxMailRenderingContext.m index 9b128f8a5..37fcdceb1 100644 --- a/UI/MailPartViewers/UIxMailRenderingContext.m +++ b/UI/MailPartViewers/UIxMailRenderingContext.m @@ -20,6 +20,7 @@ 02111-1307, USA. */ +#import #import #import diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index eed8745b2..6cc5c5819 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -213,13 +213,6 @@ static NSArray *infoKeys = nil; - (NSString *) localeCode { - SOGoUserDefaults *ud; - NSDictionary *locale; - - ud = [[context activeUser] userDefaults]; - locale = [[self resourceManager] - localeForLanguageNamed: [ud language]]; - // WARNING : NSLocaleCode is not defined in return [locale objectForKey: @"NSLocaleCode"]; } diff --git a/UI/MailerUI/UIxMailFilterPanel.m b/UI/MailerUI/UIxMailFilterPanel.m index 89e83dc0d..1e8a804db 100644 --- a/UI/MailerUI/UIxMailFilterPanel.m +++ b/UI/MailerUI/UIxMailFilterPanel.m @@ -19,6 +19,8 @@ 02111-1307, USA. */ +#import + #import #import #import diff --git a/UI/MailerUI/UIxMailListActions.m b/UI/MailerUI/UIxMailListActions.m index 55a768e97..e9142ede4 100644 --- a/UI/MailerUI/UIxMailListActions.m +++ b/UI/MailerUI/UIxMailListActions.m @@ -57,6 +57,7 @@ #import #import #import +#import #import diff --git a/UI/MailerUI/UIxMailMainFrame.m b/UI/MailerUI/UIxMailMainFrame.m index e93e39ace..a5a88c27b 100644 --- a/UI/MailerUI/UIxMailMainFrame.m +++ b/UI/MailerUI/UIxMailMainFrame.m @@ -44,10 +44,12 @@ #import #import -#import +#import #import #import #import +#import +#import #import #import #import diff --git a/UI/MailerUI/UIxMailMoveToPopUp.m b/UI/MailerUI/UIxMailMoveToPopUp.m index 4dbe418de..549d20128 100644 --- a/UI/MailerUI/UIxMailMoveToPopUp.m +++ b/UI/MailerUI/UIxMailMoveToPopUp.m @@ -20,6 +20,8 @@ 02111-1307, USA. */ +#import + #import @class NSString, NSMutableArray, NSDictionary; diff --git a/UI/MailerUI/UIxMailView.m b/UI/MailerUI/UIxMailView.m index 0c8e20fca..9e50186d8 100644 --- a/UI/MailerUI/UIxMailView.m +++ b/UI/MailerUI/UIxMailView.m @@ -19,6 +19,7 @@ 02111-1307, USA. */ +#import #import #import #import diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m index 465311ff8..d3473ae71 100644 --- a/UI/PreferencesUI/UIxPreferences.m +++ b/UI/PreferencesUI/UIxPreferences.m @@ -46,6 +46,7 @@ #import #import #import +#import #import "UIxPreferences.h" @@ -63,7 +64,6 @@ { //NSDictionary *locale; SOGoDomainDefaults *dd; - NSString *language; if ((self = [super init])) { @@ -71,7 +71,6 @@ #warning user should be the owner rather than the activeUser ASSIGN (user, [context activeUser]); ASSIGN (today, [NSCalendarDate date]); - language = [userDefaults language]; calendarCategories = nil; calendarCategoriesColors = nil; diff --git a/UI/SOGoUI/SOGoACLAdvisory.m b/UI/SOGoUI/SOGoACLAdvisory.m index e5d1c0787..f65c161c6 100644 --- a/UI/SOGoUI/SOGoACLAdvisory.m +++ b/UI/SOGoUI/SOGoACLAdvisory.m @@ -169,7 +169,7 @@ part = [NGMimeBodyPart bodyPartWithHeader: headerMap]; body = [[self body] dataUsingEncoding: NSUTF8StringEncoding]; - [part setBody: [self body]]; + [part setBody: body]; return part; } diff --git a/UI/SOGoUI/SOGoFolderAdvisory.m b/UI/SOGoUI/SOGoFolderAdvisory.m index b0b14ad68..2943b5915 100644 --- a/UI/SOGoUI/SOGoFolderAdvisory.m +++ b/UI/SOGoUI/SOGoFolderAdvisory.m @@ -140,7 +140,7 @@ part = [NGMimeBodyPart bodyPartWithHeader: headerMap]; body = [[self body] dataUsingEncoding: NSUTF8StringEncoding]; - [part setBody: [self body]]; + [part setBody: body]; return part; } diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index 77f374062..d415932c3 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -31,7 +31,6 @@ #import #import #import -#import #import #import #import @@ -48,7 +47,9 @@ #import #import #import +#import #import +#import #import "UIxJSClose.h" @@ -146,7 +147,8 @@ static SoProduct *commonProduct = nil; queryParameters = nil; ASSIGN (userDefaults, [[context activeUser] userDefaults]); language = [userDefaults language]; - ASSIGN (locale, [[self resourceManager] localeForLanguageNamed: language]); + ASSIGN (locale, + [[self resourceManager] localeForLanguageNamed: language]); } return self; diff --git a/UI/Scheduler/UIxAppointmentActions.m b/UI/Scheduler/UIxAppointmentActions.m index 5a2ebb5f6..b180a3161 100644 --- a/UI/Scheduler/UIxAppointmentActions.m +++ b/UI/Scheduler/UIxAppointmentActions.m @@ -37,6 +37,7 @@ #import #import #import +#import #import diff --git a/UI/Scheduler/UIxCalDayTable.m b/UI/Scheduler/UIxCalDayTable.m index 9030bfcc5..174e1d1ea 100644 --- a/UI/Scheduler/UIxCalDayTable.m +++ b/UI/Scheduler/UIxCalDayTable.m @@ -45,8 +45,6 @@ - (id) init { - NSDictionary *locale; - NSString *language; SOGoUser *user; SOGoUserDefaults *ud; @@ -55,8 +53,6 @@ user = [context activeUser]; ud = [user userDefaults]; ASSIGN (timeFormat, [ud timeFormat]); - language = [ud language]; - locale = [[self resourceManager] localeForLanguageNamed: language]; daysToDisplay = nil; hoursToDisplay = nil; diff --git a/UI/Scheduler/UIxCalFolderActions.m b/UI/Scheduler/UIxCalFolderActions.m index efcdf4c4b..e73268f4d 100644 --- a/UI/Scheduler/UIxCalFolderActions.m +++ b/UI/Scheduler/UIxCalFolderActions.m @@ -23,6 +23,9 @@ #import #import #import +#import + +#import #import diff --git a/UI/Scheduler/UIxCalMonthView.m b/UI/Scheduler/UIxCalMonthView.m index 97cbbeee0..c0c51097f 100644 --- a/UI/Scheduler/UIxCalMonthView.m +++ b/UI/Scheduler/UIxCalMonthView.m @@ -40,9 +40,6 @@ - (id) init { - NSDictionary *locale; - SOGoUserDefaults *ud; - if ((self = [super init])) { // monthAptFormatter @@ -50,8 +47,6 @@ // [monthAptFormatter setShortMonthTitleOnly]; // dateFormatter = [[SOGoDateFormatter alloc] // initWithLocale: [self locale]]; - ud = [[context activeUser] userDefaults]; - locale = [[self resourceManager] localeForLanguageNamed: [ud language]]; dayNames = [locale objectForKey: NSWeekDayNameArray]; [dayNames retain]; monthNames = [locale objectForKey: NSMonthNameArray]; diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 36e2ecb58..d53929de0 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -43,6 +43,7 @@ #import #import #import +#import #import #import #import @@ -766,6 +767,73 @@ iRANGE(2); 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 { NSDictionary *profile; @@ -775,6 +843,11 @@ iRANGE(2); return [profile objectForKey: @"name"]; } +- (NSString *) jsonOrganizer +{ + return [[[[self organizerProfile] allValues] lastObject] jsonRepresentation]; +} + // - (BOOL) canBeOrganizer // { // NSString *owner; @@ -904,78 +977,6 @@ iRANGE(2); 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 { ASSIGN (location, _value); @@ -1918,12 +1919,7 @@ RANGE(2); else if (range == 2) { NSCalendarDate *date; - SOGoUserDefaults *ud; - NSDictionary *locale; - ud = [[context activeUser] userDefaults]; - locale = [[self resourceManager] - localeForLanguageNamed: [ud language]]; date = [NSCalendarDate dateWithString: [self range2] calendarFormat: dateFormat locale: locale]; diff --git a/UI/Scheduler/UIxTaskEditor.m b/UI/Scheduler/UIxTaskEditor.m index 426e4ee1b..36cfa036a 100644 --- a/UI/Scheduler/UIxTaskEditor.m +++ b/UI/Scheduler/UIxTaskEditor.m @@ -392,10 +392,8 @@ { NSString *newCalendar; SOGoAppointmentFolder *thisFolder, *newFolder; - SOGoAppointmentFolders *parentFolder; SOGoTaskObject *co; SoSecurityManager *sm; - NSException *ex; co = [self clientObject]; [co saveComponent: todo]; @@ -410,14 +408,13 @@ onObject: thisFolder inContext: context]) { - parentFolder = [[self container] container]; newFolder = [[thisFolder container] lookupName: newCalendar - inContext: context - acquire: NO]; + inContext: context + acquire: NO]; if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles onObject: newFolder inContext: context]) - ex = [co moveToFolder: newFolder]; + [co moveToFolder: newFolder]; } }