diff --git a/ChangeLog b/ChangeLog index 51d560f98..3e381738b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,13 @@ 2009-10-07 Wolfgang Sourdeau + 2009-10-07 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoParentFolder.m (-hasLocalSubfolderNamed): + rewritten parts of the method to better fit our coding standards. + Exported method in the SOGoParentFolder.h to avoid warnings where + it's used. + * SoObjects/Appointments/SOGoAppointmentFolders.m (_fetchPersonalFolders:withChannel:): we now skip unexisting folders declared in the list of web folder ids to avoid problems. diff --git a/SoObjects/SOGo/SOGoParentFolder.h b/SoObjects/SOGo/SOGoParentFolder.h index 270252054..bd5bee7de 100644 --- a/SoObjects/SOGo/SOGoParentFolder.h +++ b/SoObjects/SOGo/SOGoParentFolder.h @@ -47,6 +47,8 @@ - (NSArray *) toManyRelationshipKeys; - (NSArray *) subFolders; +- (BOOL) hasLocalSubFolderNamed: (NSString *) name; + - (NSException *) newFolderWithName: (NSString *) name andNameInContainer: (NSString *) newNameInContainer; - (NSException *) newFolderWithName: (NSString *) name diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index 66f1bcbeb..e4c6dfd77 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -446,19 +446,21 @@ static SoSecurityManager *sm = nil; { NSArray *subs; NSException *error; + NSString *currentDisplayName; int i, count; - BOOL rc = NO; + BOOL rc; + + rc = NO; error = [self initSubFolders]; - if (error) - [error raise]; subs = [subFolders allValues]; count = [subs count]; - - for (i = 0; i < count; i++) - if ([name isEqualToString: [[subs objectAtIndex: i] displayName]]) - rc = YES; + for (i = 0; !rc && i < count; i++) + { + currentDisplayName = [[subs objectAtIndex: i] displayName]; + rc = [name isEqualToString: currentDisplayName]; + } return rc; }