Monotone-Parent: 4899b773e21bd6c56bae726bf720e184b8ef9ec0
Monotone-Revision: cb7b77723f765942d950c5620150b720f5d0c5b1 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-30T15:33:47 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
cd0fe5cb87
commit
2adcb276b2
|
@ -1,3 +1,11 @@
|
||||||
|
2012-03-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreUserContext.m (-timeZone): new method that
|
||||||
|
returns the timezone of an owner user.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreObject.m (-ownerTimeZone): removed method,
|
||||||
|
replaced with the one above.
|
||||||
|
|
||||||
2012-03-29 Francis Lachapelle <flachapelle@inverse.ca>
|
2012-03-29 Francis Lachapelle <flachapelle@inverse.ca>
|
||||||
|
|
||||||
* UI/WebServerResources/UIxPreferences.js (savePreferences): fixed
|
* UI/WebServerResources/UIxPreferences.js (savePreferences): fixed
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
[MAPIStoreAppointmentWrapper wrapperWithICalEvent: event
|
[MAPIStoreAppointmentWrapper wrapperWithICalEvent: event
|
||||||
andUser: [userContext sogoUser]
|
andUser: [userContext sogoUser]
|
||||||
andSenderEmail: nil
|
andSenderEmail: nil
|
||||||
inTimeZone: [self ownerTimeZone]
|
inTimeZone: [userContext timeZone]
|
||||||
withConnectionInfo: [context connectionInfo]]);
|
withConnectionInfo: [context connectionInfo]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -766,7 +766,7 @@
|
||||||
isAllDay = [value boolValue];
|
isAllDay = [value boolValue];
|
||||||
if (!isAllDay)
|
if (!isAllDay)
|
||||||
{
|
{
|
||||||
tzName = [[self ownerTimeZone] name];
|
tzName = [[[self userContext] timeZone] name];
|
||||||
tz = [iCalTimeZone timeZoneForName: tzName];
|
tz = [iCalTimeZone timeZoneForName: tzName];
|
||||||
[vCalendar addTimeZone: tz];
|
[vCalendar addTimeZone: tz];
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,8 +55,8 @@
|
||||||
{
|
{
|
||||||
struct mapistore_connection_info *connInfo;
|
struct mapistore_connection_info *connInfo;
|
||||||
NSMutableArray *containersBag;
|
NSMutableArray *containersBag;
|
||||||
SOGoUser *activeUser;
|
SOGoUser *activeUser; /* the user accessing the resource */
|
||||||
MAPIStoreUserContext *userContext;
|
MAPIStoreUserContext *userContext; /* the owner or the resource */
|
||||||
NSURL *contextUrl;
|
NSURL *contextUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -284,7 +284,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
wrapperWithICalEvent: event
|
wrapperWithICalEvent: event
|
||||||
andUser: [context activeUser]
|
andUser: [context activeUser]
|
||||||
andSenderEmail: senderEmail
|
andSenderEmail: senderEmail
|
||||||
inTimeZone: [self ownerTimeZone]
|
inTimeZone: [[self userContext] timeZone]
|
||||||
withConnectionInfo: [context connectionInfo]];
|
withConnectionInfo: [context connectionInfo]];
|
||||||
[appointmentWrapper retain];
|
[appointmentWrapper retain];
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,8 +77,6 @@
|
||||||
- (uint64_t) objectId;
|
- (uint64_t) objectId;
|
||||||
- (NSString *) url;
|
- (NSString *) url;
|
||||||
|
|
||||||
- (NSTimeZone *) ownerTimeZone;
|
|
||||||
|
|
||||||
/* properties */
|
/* properties */
|
||||||
|
|
||||||
- (BOOL) canGetProperty: (enum MAPITAGS) propTag;
|
- (BOOL) canGetProperty: (enum MAPITAGS) propTag;
|
||||||
|
|
|
@ -210,21 +210,6 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
||||||
containerURL, [self nameInContainer]];
|
containerURL, [self nameInContainer]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSTimeZone *) ownerTimeZone
|
|
||||||
{
|
|
||||||
NSString *owner;
|
|
||||||
SOGoUserDefaults *ud;
|
|
||||||
NSTimeZone *tz;
|
|
||||||
WOContext *woContext;
|
|
||||||
|
|
||||||
woContext = [[self userContext] woContext];
|
|
||||||
owner = [sogoObject ownerInContext: woContext];
|
|
||||||
ud = [[SOGoUser userWithLogin: owner] userDefaults];
|
|
||||||
tz = [ud timeZone];
|
|
||||||
|
|
||||||
return tz;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) addProperties: (NSDictionary *) newNewProperties
|
- (void) addProperties: (NSDictionary *) newNewProperties
|
||||||
{
|
{
|
||||||
[properties addEntriesFromDictionary: newNewProperties];
|
[properties addEntriesFromDictionary: newNewProperties];
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
@class NSMutableDictionary;
|
@class NSMutableDictionary;
|
||||||
@class NSString;
|
@class NSString;
|
||||||
|
@class NSTimeZone;
|
||||||
|
|
||||||
@class WOContext;
|
@class WOContext;
|
||||||
|
|
||||||
|
@ -43,6 +44,7 @@
|
||||||
{
|
{
|
||||||
NSString *username;
|
NSString *username;
|
||||||
SOGoUser *sogoUser;
|
SOGoUser *sogoUser;
|
||||||
|
NSTimeZone *timeZone;
|
||||||
|
|
||||||
SOGoUserFolder *userFolder;
|
SOGoUserFolder *userFolder;
|
||||||
NSMutableArray *containersBag;
|
NSMutableArray *containersBag;
|
||||||
|
@ -63,6 +65,8 @@
|
||||||
- (NSString *) username;
|
- (NSString *) username;
|
||||||
- (SOGoUser *) sogoUser;
|
- (SOGoUser *) sogoUser;
|
||||||
|
|
||||||
|
- (NSTimeZone *) timeZone;
|
||||||
|
|
||||||
- (SOGoUserFolder *) userFolder;
|
- (SOGoUserFolder *) userFolder;
|
||||||
|
|
||||||
- (NSDictionary *) rootFolders;
|
- (NSDictionary *) rootFolders;
|
||||||
|
|
|
@ -137,6 +137,20 @@ static NSMapTable *contextsTable = nil;
|
||||||
return sogoUser;
|
return sogoUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSTimeZone *) timeZone
|
||||||
|
{
|
||||||
|
if (!timeZone)
|
||||||
|
{
|
||||||
|
SOGoUser *user;
|
||||||
|
|
||||||
|
user = [self sogoUser];
|
||||||
|
timeZone = [[user userDefaults] timeZone];
|
||||||
|
[timeZone retain];
|
||||||
|
}
|
||||||
|
|
||||||
|
return timeZone;
|
||||||
|
}
|
||||||
|
|
||||||
- (SOGoUserFolder *) userFolder
|
- (SOGoUserFolder *) userFolder
|
||||||
{
|
{
|
||||||
if (!userFolder)
|
if (!userFolder)
|
||||||
|
|
Loading…
Reference in a new issue