mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-28 00:20:32 +00:00
Monotone-Parent: 2fc6280bdb3c83d905fa7c92b0b16e52d95d4694
Monotone-Revision: 2cc61994b1fd18611f88fb4a7bd881ef6c12c05c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-07-14T16:47:10 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -53,6 +53,8 @@
|
||||
/* content */
|
||||
|
||||
- (BOOL) isNew;
|
||||
- (void) setIsNew: (BOOL) newIsNew;
|
||||
|
||||
- (NSString *) contentAsString;
|
||||
- (NSException *) saveContentString: (NSString *) _str
|
||||
baseVersion: (unsigned int) _baseVersion;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user