diff --git a/ChangeLog b/ChangeLog index cdae31e8b..3ec076da6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-01-09 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoGCSFolder.m ([SOGoGCSFolder + -sendFolderAdvisoryTemplate:template]): the condition check for + sending folder advisories has been moved here. + ([SOGoGCSFolder -sendFolderAdvisoryTemplate:template]): now a + public method. + 2008-01-07 Ludovic Marcotte * Added Documentation/SOGo Mobile Devices Configuration.odt diff --git a/SoObjects/SOGo/SOGoGCSFolder.h b/SoObjects/SOGo/SOGoGCSFolder.h index fcf11cd8c..e3fe35b8c 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.h +++ b/SoObjects/SOGo/SOGoGCSFolder.h @@ -98,6 +98,9 @@ - (void) removeAclsForUsers: (NSArray *) users forObjectAtPath: (NSArray *) objectPathArray; +/* advisories */ +- (void) sendFolderAdvisoryTemplate: (NSString *) template; + @end #endif /* __SOGo_SOGoGCSFolder_H__ */ diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index fc25a53fa..88840eb2d 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -378,15 +378,18 @@ static NSArray *childRecordFields = nil; SOGoUser *user; SOGoFolderAdvisory *page; - user = [context activeUser]; - pageName = [NSString stringWithFormat: @"SOGoFolder%@%@Advisory", - [user language], template]; + if (sendFolderAdvisories) + { + user = [context activeUser]; + pageName = [NSString stringWithFormat: @"SOGoFolder%@%@Advisory", + [user language], template]; - page = [[WOApplication application] pageWithName: pageName - inContext: context]; - [page setFolderObject: self]; - [page setRecipientUID: [user login]]; - [page send]; + page = [[WOApplication application] pageWithName: pageName + inContext: context]; + [page setFolderObject: self]; + [page setRecipientUID: [user login]]; + [page send]; + } } - (BOOL) create @@ -398,8 +401,7 @@ static NSArray *childRecordFields = nil; atPath: ocsPath]; if (!result - && [[context request] handledByDefaultHandler] - && sendFolderAdvisories) + && [[context request] handledByDefaultHandler]) [self sendFolderAdvisoryTemplate: @"Addition"]; return (result == nil); @@ -418,8 +420,7 @@ static NSArray *childRecordFields = nil; else error = [[self folderManager] deleteFolderAtPath: ocsPath]; - if (!error && sendFolderAdvisories - && [[context request] handledByDefaultHandler]) + if (!error && [[context request] handledByDefaultHandler]) [self sendFolderAdvisoryTemplate: @"Removal"]; return error;