mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-12 05:49:42 +00:00
Monotone-Parent: f52396704f73dfc96a00df9959e4d9cb043d72fe
Monotone-Revision: f3663656115d10ecd6bde3134ecce315d9e7b6f2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-05-30T20:21:54 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
2007-05-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Common/UIxFolderActions.m ([UIxFolderActions
|
||||
-_realActionWithFolderName:folderDict]): handle the possible
|
||||
presence of the "mail-invitation" url parameter. If present, the
|
||||
user will be redirected to the relevant folder.
|
||||
|
||||
* SoObjects/SOGo/SOGoUser.m ([SOGoUser -fullEmail]): new proxy method.
|
||||
([SOGoUser -language]): new method that returns the user's
|
||||
preferred language, or the system's if none has been set yet.
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
NSString *baseFolder;
|
||||
NSMutableString *subscriptionPointer;
|
||||
NSMutableDictionary *moduleSettings;
|
||||
BOOL isMailInvitation;
|
||||
}
|
||||
|
||||
- (WOResponse *) subscribeAction;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSURL.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
@@ -45,7 +46,7 @@
|
||||
|
||||
- (void) _setupContext
|
||||
{
|
||||
NSString *clientClass;
|
||||
NSString *clientClass, *mailInvitationParam;
|
||||
SOGoUser *activeUser;
|
||||
|
||||
activeUser = [context activeUser];
|
||||
@@ -76,12 +77,17 @@
|
||||
if ([baseFolder isEqualToString: @"Contacts"])
|
||||
[subscriptionPointer appendFormat: @"/%@",
|
||||
[clientObject nameInContainer]];
|
||||
|
||||
mailInvitationParam
|
||||
= [[context request] formValueForKey: @"mail-invitation"];
|
||||
isMailInvitation = [mailInvitationParam boolValue];
|
||||
}
|
||||
|
||||
- (WOResponse *) _realActionWithFolderName: (NSDictionary *) folderDict
|
||||
{
|
||||
WOResponse *response;
|
||||
NSMutableDictionary *folderSubscription;
|
||||
NSString *mailInvitationURL;
|
||||
|
||||
response = [context response];
|
||||
if ([owner isEqualToString: login])
|
||||
@@ -107,7 +113,18 @@
|
||||
[folderSubscription removeObjectForKey: subscriptionPointer];
|
||||
|
||||
[ud synchronize];
|
||||
[response setStatus: 204];
|
||||
|
||||
if (isMailInvitation)
|
||||
{
|
||||
mailInvitationURL
|
||||
= [[clientObject soURLToBaseContainerForCurrentUser]
|
||||
absoluteString];
|
||||
[response setStatus: 302];
|
||||
[response setHeader: mailInvitationURL
|
||||
forKey: @"location"];
|
||||
}
|
||||
else
|
||||
[response setStatus: 204];
|
||||
}
|
||||
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user