See ChangeLog

Monotone-Parent: 8c84d6a640b03db846372423022159e6855f501a
Monotone-Revision: 1fc6240dbb88ca9e470be6d2679ee8e3e10e4f4f

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2008-11-26T12:20:26
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2008-11-26 12:20:26 +00:00
parent a127fc11fc
commit eba307e5c0
3 changed files with 52 additions and 21 deletions
+9
View File
@@ -1,3 +1,12 @@
2008-11-26 Ludovic Marcotte <lmarcotte@inverse.ca>
* SoObjects/SOGo/SOGoGCSFolder.m
We escape the ' character in the folder name
before trying to set it.
* SoObjects/Appointments/SOGoAppointmentObject.m
We now handle the originator/organizer correctly
when posting CalDAV messages.
2008-11-24 Ludovic Marcotte <lmarcotte@inverse.ca>
* We now sort the results in the subsription window
+40 -20
View File
@@ -190,29 +190,30 @@
return object;
}
- (void) _addOrUpdateEvent: (iCalEvent *) event
forUID: (NSString *) uid
- (void) _addOrUpdateEvent: (iCalEvent *) theEvent
forUID: (NSString *) theUID
owner: (NSString *) theOwner
{
SOGoAppointmentObject *object;
NSString *iCalString, *userLogin;
userLogin = [[context activeUser] login];
if (![uid isEqualToString: userLogin])
if (![theUID isEqualToString: theOwner])
{
object = [self _lookupEvent: [event uid] forUID: uid];
iCalString = [[event parent] versitString];
SOGoAppointmentObject *object;
NSString *iCalString;
object = [self _lookupEvent: [theEvent uid] forUID: theUID];
iCalString = [[theEvent parent] versitString];
[object saveContentString: iCalString];
}
}
- (void) _removeEventFromUID: (NSString *) uid
- (void) _removeEventFromUID: (NSString *) theUID
owner: (NSString *) theOwner
{
SOGoAppointmentFolder *folder;
SOGoAppointmentObject *object;
if (![uid isEqualToString: owner])
if (![theUID isEqualToString: theOwner])
{
folder = [container lookupCalendarFolderForUID: uid];
SOGoAppointmentFolder *folder;
SOGoAppointmentObject *object;
folder = [container lookupCalendarFolderForUID: theUID];
object = [folder lookupName: nameInContainer
inContext: context acquire: NO];
if (![object isKindOfClass: [NSException class]])
@@ -232,7 +233,8 @@
{
currentUID = [currentAttendee uid];
if (currentUID)
[self _removeEventFromUID: currentUID];
[self _removeEventFromUID: currentUID
owner: owner];
}
}
@@ -268,7 +270,8 @@
currentUID = [currentAttendee uid];
if (currentUID)
[self _addOrUpdateEvent: newEvent
forUID: currentUID];
forUID: currentUID
owner: owner];
}
[self sendEMailUsingTemplateNamed: @"Update"
@@ -290,7 +293,8 @@
currentUID = [currentAttendee uid];
if (currentUID)
[self _addOrUpdateEvent: newEvent
forUID: currentUID];
forUID: currentUID
owner: owner];
}
}
@@ -587,6 +591,14 @@
return code;
}
//
// The originator here is the owner of the calendar where
// the event was created. Lightning sends us exactly this
// and handles the SENT-BY itself. We might have to review
// this if the originator ever becomes the user on whom
// the act is performed (ie. Alice creates an event in Bob's
// calendar and invites Thomas).
//
- (NSArray *) postCalDAVEventRequestTo: (NSArray *) recipients
from: (NSString *) originator
{
@@ -629,7 +641,10 @@
else
hasChanged = NO;
}
[self _addOrUpdateEvent: event forUID: uid];
[self _addOrUpdateEvent: event
forUID: uid
owner: [[LDAPUserManager sharedUserManager]
getUIDForEmail: originator]];
}
#warning fix this when sendEmailUsing blabla has been cleaned up
if (hasChanged)
@@ -646,6 +661,9 @@
return elements;
}
//
// See our comment about the originator in the method above.
//
- (NSArray *) postCalDAVEventCancelTo: (NSArray *) recipients
from: (NSString *) originator
{
@@ -666,7 +684,9 @@
[person setValue: 0 to: recipient];
uid = [person uid];
if (uid)
[self _removeEventFromUID: uid];
[self _removeEventFromUID: uid
owner: [[LDAPUserManager sharedUserManager]
getUIDForEmail: originator]];
#warning fix this when sendEmailUsing blabla has been cleaned up
[self sendEMailUsingTemplateNamed: @"Deletion"
forObject: event
+3 -1
View File
@@ -444,7 +444,9 @@ static NSArray *childRecordFields = nil;
sql
= [NSString stringWithFormat: (@"UPDATE %@ SET c_foldername = '%@'"
@" WHERE c_path = '%@'"),
[folderLocation gcsTableName], newName, ocsPath];
[folderLocation gcsTableName],
[newName stringByReplacingString: @"'" withString: @"''"],
ocsPath];
[fc evaluateExpressionX: sql];
[cm releaseChannel: fc];
// sql = [sql stringByAppendingFormat:@" WHERE %@ = '%@'",