Fixed errors in ab import/export

Monotone-Parent: e5b6580e3ea6df5bbc9bde0db8b2a350b69e3eb8
Monotone-Revision: 2494a7d12f52699f7ee338f8403ab926c0c118ab

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2009-09-28T13:25:14
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
C Robert
2009-09-28 13:25:14 +00:00
parent 9a04b3bdfd
commit 1648d063af
2 changed files with 11 additions and 10 deletions
@@ -3195,6 +3195,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
[event setUid: uid];
object = [SOGoAppointmentObject objectWithName: uid
inContainer: self];
[object setIsNew: YES];
content =
[NSString stringWithFormat: @"BEGIN:VCALENDAR\n%@\nEND:VCALENDAR",
[event versitString]];
+10 -10
View File
@@ -207,24 +207,24 @@
- (BOOL) importVcard: (NGVCard *) card
{
NSString *uid, *name;
NSString *uid;
SOGoContactGCSFolder *folder;
NSException *ex;
SOGoContactGCSEntry *contact;
BOOL rc = NO;
if (card)
{
folder = [self clientObject];
uid = [folder globallyUniqueObjectId];
name = [NSString stringWithFormat: @"%@.vcf", uid];
[card setUid: uid];
ex = [[folder ocsFolder] writeContent: [card versitString]
toName: name
baseVersion: 0];
if (ex)
NSLog (@"write failed: %@", ex);
else
rc = YES;
contact = [SOGoContactGCSEntry objectWithName: uid
inContainer: folder];
[contact setIsNew: YES];
[contact saveContentString: [card versitString]];
rc = YES;
}
return rc;