Monotone-Parent: ef1202eb23562c04fbe5f3e3ce4cab4319fe9b98

Monotone-Revision: 8c84d6a640b03db846372423022159e6855f501a

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-11-26T01:58:33
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-11-26 01:58:33 +00:00
parent 0f8fb4e270
commit a127fc11fc
2 changed files with 15 additions and 9 deletions
@@ -1470,15 +1470,13 @@ static Class sogoAppointmentFolderKlass = Nil;
// has only asked for {DAV:}getetag with no other properties,
// we do not load the c_content and other fields from the
// database as this can be pretty costly.
#if 0
// FOR AN UNKNOWN REASON FOR NOW, THIS GENERATES EMPTY ETAGS (ALL HAVE GCS0000000 VALUE)
#warning we should build the list of fields based on the requested props
if ([*properties caseInsensitiveCompare: @"{DAV:}getetag"] == NSOrderedSame &&
!*(properties+1))
fields = [NSArray arrayWithObjects: @"c_name", @"c_creationdate",
@"c_lastmodified", @"c_version",
@"c_component", nil];
else
#endif
fields = reportQueryFields;
filterList = [filters objectEnumerator];
+14 -6
View File
@@ -86,17 +86,25 @@
- (void) _setRecord: (NSDictionary *) objectRecord
{
NSString *newContent;
id data;
int intValue;
newContent = [objectRecord objectForKey: @"c_content"];
if (newContent)
data = [objectRecord objectForKey: @"c_content"];
if (data)
ASSIGN (content, data);
data = [objectRecord objectForKey: @"c_version"];
if (data)
version = [data unsignedIntValue];
data = [objectRecord objectForKey: @"c_creationdate"];
if (data)
{
ASSIGN (content, newContent);
version = [[objectRecord objectForKey: @"c_version"] unsignedIntValue];
intValue = [[objectRecord objectForKey: @"c_creationdate"] intValue];
intValue = [data intValue];
ASSIGN (creationDate,
[NSCalendarDate dateWithTimeIntervalSince1970: intValue]);
}
data = [objectRecord objectForKey: @"c_lastmodified"];
if (data)
{
intValue = [[objectRecord objectForKey: @"c_lastmodified"] intValue];
ASSIGN (lastModified,
[NSCalendarDate dateWithTimeIntervalSince1970: intValue]);