#include "SOGoMailAccounts.h"
#include "common.h"
#include <NGObjWeb/SoObject+SoDAV.h>
-#include <SOGo/AgenorUserManager.h>
#include <SOGo/WOContext+Agenor.h>
@implementation SOGoMailAccounts
/* listing the available mailboxes */
- (NSArray *)toManyRelationshipKeys {
- static AgenorUserManager *um = nil;
- NSString *uid;
- id account;
- NSArray *shares;
+ WOContext *ctx;
+ id user;
+ id account;
+ NSArray *shares;
- if (um == nil)
- um = [[AgenorUserManager sharedUserManager] retain];
-
- uid = [[self container] davDisplayName]; /* the uid part of the URL */
- account = [um getIMAPAccountStringForUID:uid];
- if (account != nil) account = [NSArray arrayWithObject:account];
+ if ((ctx = [[WOApplication application] context]) == nil) {
+ [self logWithFormat:@"ERROR(%s): cannot procede without context!",
+ __PRETTY_FUNCTION__];
+ return nil;
+ }
+ user = [ctx activeUser];
+ account = [user valueForKey:@"primaryIMAP4AccountString"];
+ if ([account isNotNull]) account = [NSArray arrayWithObject:account];
if ([self isInternetRequest]) /* only show primary mailbox in Internet */
return account;
- shares = [um getSharedMailboxAccountStringsForUID:uid];
+ shares = [user valueForKey:@"additionalIMAP4AccountStrings"];
return ([shares count] == 0)
? account
: [account arrayByAddingObjectsFromArray:shares];
+2005-07-12 Helge Hess <helge.hess@opengroupware.org>
+
+ * UIxMailEditor.m: use new SoUser API instead of AgenorUserManager
+ (v0.9.137)
+
2005-07-11 Helge Hess <helge.hess@opengroupware.org>
* UIxMailMainFrame.m: generate proper URLs for jumping to Calendar,
#include <SoObjects/Mailer/SOGoMailFolder.h>
#include <SoObjects/Mailer/SOGoMailAccount.h>
#include <SoObjects/SOGo/WOContext+Agenor.h>
-#include <SoObjects/SOGo/AgenorUserManager.h>
#include <NGMail/NGMimeMessage.h>
#include <NGMail/NGMimeMessageGenerator.h>
#include "common.h"
}
shares =
- [[AgenorUserManager sharedUserManager] getSharedMailboxEMailsForUID:uid];
+ [[[self context] activeUser] valueForKey:@"primaryIMAP4AccountString"];
if ([shares count] == 0)
self->fromEMails = [[NSArray alloc] initWithObjects:&primary count:1];
else {