From: wolfgang Date: Tue, 12 Feb 2008 15:51:05 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1371 d1b88da0-ebda-0310... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b52812f502d172e47c0c50de75b3a9da34967fc;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1371 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/ChangeLog b/ChangeLog index f41a8271..d94e3b07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2008-02-12 Wolfgang Sourdeau + + * SoObjects/Appointments/SOGoFreeBusyObject.m ([SOGoFreeBusyObject + -iCalStringForFreeBusyInfos:_infosfrom:_startDateto:_endDate]): we + no longer invoke [container login], since this method has been + removed. Instead we invoke ownerInContext:. + + * SoObjects/SOGo/SOGoFolder.m ([SOGoFolder + -fetchContentObjectNames]): new model method for all subclasses. + This will be removed in the future since toOneRelationshipKeys + must be sufficient. + + * SoObjects/SOGo/SOGoGCSFolder.m ([SOGoGCSFolder + -defaultFilenameExtension]): removed useless method. + ([-toOneRelationshipKeys]): moved method into SOGoFolder.m. + 2008-02-08 Wolfgang Sourdeau * UI/MailPartViewers/UIxMailPartICalViewer.m diff --git a/SoObjects/Appointments/SOGoFreeBusyObject.m b/SoObjects/Appointments/SOGoFreeBusyObject.m index 4aa053f3..b6ecfda2 100644 --- a/SoObjects/Appointments/SOGoFreeBusyObject.m +++ b/SoObjects/Appointments/SOGoFreeBusyObject.m @@ -148,7 +148,7 @@ NSDictionary *info; iCalFreeBusyType type; - uid = [[self container] login]; + uid = [container ownerInContext: context]; calendar = [iCalCalendar groupWithTag: @"vcalendar"]; [calendar setProdID: @"//Inverse groupe conseil/SOGo 0.9"]; diff --git a/SoObjects/SOGo/SOGoFolder.h b/SoObjects/SOGo/SOGoFolder.h index 2e02a9f3..fcc61bf4 100644 --- a/SoObjects/SOGo/SOGoFolder.h +++ b/SoObjects/SOGo/SOGoFolder.h @@ -34,6 +34,7 @@ - (NSString *) displayName; - (NSString *) folderType; +- (NSArray *) fetchContentObjectNames; /* sorting */ - (NSComparisonResult) compare: (id) otherFolder; diff --git a/SoObjects/SOGo/SOGoFolder.m b/SoObjects/SOGo/SOGoFolder.m index 1460deb1..61986119 100644 --- a/SoObjects/SOGo/SOGoFolder.m +++ b/SoObjects/SOGo/SOGoFolder.m @@ -101,6 +101,17 @@ return obj; } +#warning we should remove this method +- (NSArray *) toOneRelationshipKeys +{ + return [self fetchContentObjectNames]; +} + +- (NSArray *) fetchContentObjectNames +{ + return [NSArray array]; +} + - (BOOL) isFolderish { return YES; diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index f8b4136a..b7c81f96 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -342,6 +342,7 @@ static BOOL sendFolderAdvisories = NO; } if ([records isKindOfClass: [NSException class]]) return records; + return [records objectsForKey: @"c_name"]; } @@ -383,6 +384,7 @@ static BOOL sendFolderAdvisories = NO; } } +#warning this method is dirty code - (NSDictionary *) fetchContentStringsAndNamesOfAllObjects { NSDictionary *files; @@ -398,48 +400,6 @@ static BOOL sendFolderAdvisories = NO; return files; } -/* reflection */ - -- (NSString *) defaultFilenameExtension -{ - /* - Override to add an extension to a filename - - Note: be careful with that, needs to be consistent with object lookup! - */ - return nil; -} - -- (NSArray *) toOneRelationshipKeys -{ - /* toOneRelationshipKeys are the 'files' contained in a folder */ - NSMutableArray *ma; - NSArray *names; - NSString *name, *ext; - unsigned i, count; - NSRange r; - - names = [self fetchContentObjectNames]; - count = [names count]; - ext = [self defaultFilenameExtension]; - if (count && [ext length] > 0) - { - ma = [NSMutableArray arrayWithCapacity: count]; - for (i = 0; i < count; i++) - { - name = [names objectAtIndex: i]; - r = [name rangeOfString: @"."]; - if (r.length == 0) - name = [NSMutableString stringWithFormat: @"%@.%@", name, ext]; - [ma addObject: name]; - } - - names = ma; - } - - return names; -} - #warning this code should be cleaned up #warning this code is a dup of UIxFolderActions,\ we should remove the methods there instead