mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-28 08:19:28 +00:00
Monotone-Parent: ae2f3622e019b557af4f9dd642911dec3afe7ba1
Monotone-Revision: 86fd1ace33a761145516f77910d46684fbe4f423 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-08-08T19:10:28 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -445,10 +445,11 @@
|
||||
{
|
||||
// iCalCalendar *vCalendar;
|
||||
// NSCalendarDate *now;
|
||||
NSString *uid;
|
||||
NSString *uid, *nameInContainer;
|
||||
// iCalEvent *newEvent;
|
||||
// iCalPerson *userPerson;
|
||||
SOGoUser *activeUser;
|
||||
NSRange rangeOfDot;
|
||||
|
||||
if (isNew)
|
||||
{
|
||||
@@ -463,10 +464,27 @@
|
||||
[self _fixupAppointmentObjectWithUID: uid];
|
||||
}
|
||||
else
|
||||
uid = [SOGoObject globallyUniqueObjectId];
|
||||
{
|
||||
/* We create a UID from the nameInContainer, or the reverse if the
|
||||
latter is already set... */
|
||||
nameInContainer = [sogoObject nameInContainer];
|
||||
if (nameInContainer)
|
||||
{
|
||||
rangeOfDot = [nameInContainer rangeOfString: @"."
|
||||
options: NSBackwardsSearch];
|
||||
if (rangeOfDot.location == NSNotFound)
|
||||
uid = nameInContainer;
|
||||
else
|
||||
uid = [nameInContainer substringToIndex: rangeOfDot.location];
|
||||
}
|
||||
else
|
||||
{
|
||||
uid = [SOGoObject globallyUniqueObjectId];
|
||||
nameInContainer = [NSString stringWithFormat: @"%@.ics", uid];
|
||||
[sogoObject setNameInContainer: nameInContainer];
|
||||
}
|
||||
}
|
||||
[masterEvent setUid: uid];
|
||||
[sogoObject setNameInContainer:
|
||||
[NSString stringWithFormat: @"%@.ics", uid]];
|
||||
}
|
||||
|
||||
// [self logWithFormat: @"-save, event props:"];
|
||||
|
||||
Reference in New Issue
Block a user