diff --git a/ChangeLog b/ChangeLog index 6653ed5df..6156ad7ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-07-14 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoContentObject.m ([SOGoContentObject + -setIsNew:newIsNew]): new setter that declares the record as new, + since it is no longer so by default. + * SoObjects/Appointments/SOGoAppointmentFolder.m ([SOGoAppointmentFolder -davCalendarOrder]) ([SOGoAppointmentFolder -setDavCalendarOrder:newColor]): new accessors to handle Apple's "calendar-order" property. diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 9ba1b5c2c..ee022bb64 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -154,8 +154,11 @@ } if (!object) - object = [SOGoAppointmentObject objectWithName: nameInContainer - inContainer: folder]; + { + object = [SOGoAppointmentObject objectWithName: nameInContainer + inContainer: folder]; + [object setIsNew: YES]; + } return object; } diff --git a/SoObjects/SOGo/SOGoContentObject.h b/SoObjects/SOGo/SOGoContentObject.h index 0961ae2a4..958ce9ed7 100644 --- a/SoObjects/SOGo/SOGoContentObject.h +++ b/SoObjects/SOGo/SOGoContentObject.h @@ -53,6 +53,8 @@ /* content */ - (BOOL) isNew; +- (void) setIsNew: (BOOL) newIsNew; + - (NSString *) contentAsString; - (NSException *) saveContentString: (NSString *) _str baseVersion: (unsigned int) _baseVersion; diff --git a/SoObjects/SOGo/SOGoContentObject.m b/SoObjects/SOGo/SOGoContentObject.m index e3e36605c..002cb7d40 100644 --- a/SoObjects/SOGo/SOGoContentObject.m +++ b/SoObjects/SOGo/SOGoContentObject.m @@ -73,7 +73,7 @@ { if ((self = [super init])) { - isNew = YES; + isNew = NO; content = nil; version = 0; lastModified = nil; @@ -91,7 +91,6 @@ newContent = [objectRecord objectForKey: @"c_content"]; if (newContent) { - isNew = NO; ASSIGN (content, newContent); version = [[objectRecord objectForKey: @"c_version"] unsignedIntValue]; intValue = [[objectRecord objectForKey: @"c_creationdate"] intValue]; @@ -151,6 +150,11 @@ return isNew; } +- (void) setIsNew: (BOOL) newIsNew +{ + isNew = newIsNew; +} + - (NSString *) contentAsString { return content; diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index c32cec58e..414f7db9b 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -573,8 +573,11 @@ static NSArray *childRecordFields = nil; { request = [localContext request]; if ([[request method] isEqualToString: @"PUT"]) - obj = [self _createChildComponentWithName: key - andContent:[request contentAsString]]; + { + obj = [self _createChildComponentWithName: key + andContent: [request contentAsString]]; + [obj setIsNew: YES]; + } } }