From: helge Date: Tue, 12 Jul 2005 09:54:46 +0000 (+0000) Subject: use new SoUser API instead of AgenorUserManager X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=400c27927cef33e9954b92caaf5cdefdd79aff6a;p=scalable-opengroupware.org use new SoUser API instead of AgenorUserManager git-svn-id: http://svn.opengroupware.org/SOGo/trunk@715 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/SoObjects/Mailer/ChangeLog b/SOGo/SoObjects/Mailer/ChangeLog index 18144025..dbdbe4c4 100644 --- a/SOGo/SoObjects/Mailer/ChangeLog +++ b/SOGo/SoObjects/Mailer/ChangeLog @@ -1,3 +1,8 @@ +2005-07-12 Helge Hess + + * SOGoMailAccounts.m: use new SoUser API instead of AgenorUserManager + (v0.9.99) + 2005-07-11 Helge Hess * v0.9.98 diff --git a/SOGo/SoObjects/Mailer/SOGoMailAccounts.m b/SOGo/SoObjects/Mailer/SOGoMailAccounts.m index 0c420313..6b2c8f83 100644 --- a/SOGo/SoObjects/Mailer/SOGoMailAccounts.m +++ b/SOGo/SoObjects/Mailer/SOGoMailAccounts.m @@ -22,7 +22,6 @@ #include "SOGoMailAccounts.h" #include "common.h" #include -#include #include @implementation SOGoMailAccounts @@ -39,22 +38,24 @@ static NSString *AgenorShareLoginMarker = @".-."; /* 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]; diff --git a/SOGo/SoObjects/Mailer/Version b/SOGo/SoObjects/Mailer/Version index ccbc76c2..276a9cb3 100644 --- a/SOGo/SoObjects/Mailer/Version +++ b/SOGo/SoObjects/Mailer/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=98 +SUBMINOR_VERSION:=99 # v0.9.96 requires libNGMime v4.5.223 # v0.9.91 requires libNGMime v4.5.222 diff --git a/SOGo/UI/MailerUI/ChangeLog b/SOGo/UI/MailerUI/ChangeLog index 1ce44b93..c0427c99 100644 --- a/SOGo/UI/MailerUI/ChangeLog +++ b/SOGo/UI/MailerUI/ChangeLog @@ -1,3 +1,8 @@ +2005-07-12 Helge Hess + + * UIxMailEditor.m: use new SoUser API instead of AgenorUserManager + (v0.9.137) + 2005-07-11 Helge Hess * UIxMailMainFrame.m: generate proper URLs for jumping to Calendar, diff --git a/SOGo/UI/MailerUI/UIxMailEditor.m b/SOGo/UI/MailerUI/UIxMailEditor.m index b9277bcc..1da9f441 100644 --- a/SOGo/UI/MailerUI/UIxMailEditor.m +++ b/SOGo/UI/MailerUI/UIxMailEditor.m @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include "common.h" @@ -187,7 +186,7 @@ static NSArray *infoKeys = nil; } shares = - [[AgenorUserManager sharedUserManager] getSharedMailboxEMailsForUID:uid]; + [[[self context] activeUser] valueForKey:@"primaryIMAP4AccountString"]; if ([shares count] == 0) self->fromEMails = [[NSArray alloc] initWithObjects:&primary count:1]; else { diff --git a/SOGo/UI/MailerUI/Version b/SOGo/UI/MailerUI/Version index 3dd15304..26692b34 100644 --- a/SOGo/UI/MailerUI/Version +++ b/SOGo/UI/MailerUI/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=136 +SUBMINOR_VERSION:=137 # v0.9.134 requires libSOGo v0.9.41 # v0.9.100 requires libNGMime v4.5.213