From 17dfe238b1a1c79be5defba7c8a085dcddd29f3a Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 9 Jan 2009 17:32:30 +0000 Subject: [PATCH] Monotone-Parent: 6866d4abaee108a54dd6fba0c2f1d7d1c2988643 Monotone-Revision: 9af95afe2010bba949dc73bd6027dbc10d2d4cf5 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-01-09T17:32:30 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ SoObjects/SOGo/SOGoGCSFolder.h | 3 +++ SoObjects/SOGo/SOGoGCSFolder.m | 25 +++++++++++++------------ 3 files changed, 24 insertions(+), 12 deletions(-) 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;