mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-27 07:49:29 +00:00
Monotone-Parent: e12c6a7ac6a504dcbea24890a7be8b72b8dc91a4
Monotone-Revision: a3bdc2441cad158c03e3bb175dd766004db14021 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-07-15T17:05:29 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2010-07-15 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Appointments/SOGoAppointmentFolder.m
|
||||
(-lookupCalendarFolderForUID:): removed useless method, which can
|
||||
be replaced with -[SOGoUser personalCalendarFolderInContext:].
|
||||
|
||||
* UI/Scheduler/UIxCalListingActions.m
|
||||
(_aptFolder:withClientObject:): removed unused method.
|
||||
|
||||
|
||||
@@ -123,7 +123,6 @@ typedef enum {
|
||||
- (id) lookupHomeFolderForUID: (NSString *) _uid
|
||||
inContext: (id) _ctx;
|
||||
|
||||
- (SOGoAppointmentFolder *) lookupCalendarFolderForUID: (NSString *) uid;
|
||||
- (NSArray *) lookupCalendarFoldersForUID: (NSString *) theUID;
|
||||
- (NSArray *) lookupCalendarFoldersForUIDs: (NSArray *) _uids
|
||||
inContext: (id) _ctx;
|
||||
|
||||
@@ -2644,36 +2644,6 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// This method returns the personal calendar of a specific user.
|
||||
//
|
||||
- (SOGoAppointmentFolder *) lookupCalendarFolderForUID: (NSString *) uid
|
||||
{
|
||||
SOGoFolder *currentContainer;
|
||||
SOGoAppointmentFolders *parent;
|
||||
NSException *error;
|
||||
|
||||
currentContainer = [[container container] container];
|
||||
currentContainer = [currentContainer lookupName: uid
|
||||
inContext: context
|
||||
acquire: NO];
|
||||
parent = [currentContainer lookupName: @"Calendar" inContext: context
|
||||
acquire: NO];
|
||||
currentContainer = [parent lookupName: @"personal" inContext: context
|
||||
acquire: NO];
|
||||
if (!currentContainer)
|
||||
{
|
||||
error = [parent newFolderWithName: [parent defaultFolderName]
|
||||
andNameInContainer: @"personal"];
|
||||
if (!error)
|
||||
currentContainer = [parent lookupName: @"personal"
|
||||
inContext: context
|
||||
acquire: NO];
|
||||
}
|
||||
|
||||
return (SOGoAppointmentFolder *) currentContainer;
|
||||
}
|
||||
|
||||
//
|
||||
// This method returns an array containing all the calendar folders
|
||||
// of a specific user, excluding her/his subscriptions.
|
||||
@@ -2712,6 +2682,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
NSMutableArray *folders;
|
||||
NSEnumerator *e;
|
||||
NSString *uid, *ownerLogin;
|
||||
SOGoUser *user;
|
||||
id folder;
|
||||
|
||||
ownerLogin = [self ownerInContext: context];
|
||||
@@ -2725,7 +2696,8 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
folder = self;
|
||||
else
|
||||
{
|
||||
folder = [self lookupCalendarFolderForUID: uid];
|
||||
user = [SOGoUser userWithLogin: uid];
|
||||
folder = [user personalCalendarFolderInContext: context];
|
||||
if (![folder isNotNull])
|
||||
[self logWithFormat:@"Note: did not find folder for uid: '%@'", uid];
|
||||
}
|
||||
|
||||
@@ -163,7 +163,8 @@
|
||||
if (!object)
|
||||
{
|
||||
// Create the event in the user's personal calendar.
|
||||
folder = [container lookupCalendarFolderForUID: uid];
|
||||
folder = [[SOGoUser userWithLogin: uid]
|
||||
personalCalendarFolderInContext: context];
|
||||
object = [SOGoAppointmentObject objectWithName: nameInContainer
|
||||
inContainer: folder];
|
||||
[object setIsNew: YES];
|
||||
@@ -265,7 +266,8 @@
|
||||
|
||||
// Invitations are always written to the personal folder; it's not necessay
|
||||
// to look into all folders of the user
|
||||
folder = [container lookupCalendarFolderForUID: theUID];
|
||||
folder = [[SOGoUser userWithLogin: theUID]
|
||||
personalCalendarFolderInContext: context];
|
||||
object = [folder lookupName: nameInContainer
|
||||
inContext: context acquire: NO];
|
||||
if (![object isKindOfClass: [NSException class]])
|
||||
|
||||
Reference in New Issue
Block a user