mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-02 08:59:45 +00:00
Monotone-Parent: 0bf13271077dfd22aaca8a2663fe7490f9d84cb3
Monotone-Revision: a216f87669942e793f9124b63661a5ae82105c1d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-02-01T16:28:53 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
@@ -28,6 +29,7 @@
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
|
||||
#import <SoObjects/Mailer/SOGoMailObject.h>
|
||||
#import <SoObjects/Mailer/SOGoMailAccount.h>
|
||||
#import <SoObjects/Mailer/SOGoMailAccounts.h>
|
||||
#import <SoObjects/SOGo/NSDictionary+URL.h>
|
||||
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||
@@ -71,6 +73,29 @@
|
||||
return [accountNames jsonRepresentation];
|
||||
}
|
||||
|
||||
- (NSString *) quotaSupport
|
||||
{
|
||||
NSEnumerator *accountNames;
|
||||
NSMutableArray *quotas;
|
||||
NSString *currentAccount;
|
||||
SOGoMailAccounts *co;
|
||||
BOOL supportsQuota;
|
||||
|
||||
co = [self clientObject];
|
||||
accountNames = [[co toManyRelationshipKeys] objectEnumerator];
|
||||
|
||||
quotas = [NSMutableArray array];
|
||||
while ((currentAccount = [accountNames nextObject]))
|
||||
{
|
||||
supportsQuota = [[co lookupName: currentAccount
|
||||
inContext: context
|
||||
acquire: NO] supportsQuotas];
|
||||
[quotas addObject: [NSNumber numberWithInt: supportsQuota]];
|
||||
}
|
||||
|
||||
return [quotas jsonRepresentation];
|
||||
}
|
||||
|
||||
- (NSString *) pageFormURL
|
||||
{
|
||||
NSString *u;
|
||||
@@ -127,7 +152,9 @@
|
||||
accounts = [[context activeUser] mailAccounts];
|
||||
firstAccount = [[accounts objectsForKey: @"name"] objectAtIndex: 0];
|
||||
formValues = [[context request] formValues];
|
||||
parameters = [formValues count] > 0 ? [formValues asURLParameters] : @"?mailto=";
|
||||
parameters = ([formValues count] > 0
|
||||
? [formValues asURLParameters]
|
||||
: @"?mailto=");
|
||||
newLocation = [NSString stringWithFormat: @"%@/%@/compose%@",
|
||||
[co baseURLInContext: context],
|
||||
firstAccount,
|
||||
|
||||
Reference in New Issue
Block a user