mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
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:
@@ -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]];
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user