From: helge Date: Sun, 13 Feb 2005 03:03:40 +0000 (+0000) Subject: improved message lookup X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d42ec650bea6e30c4f1a8f8bb9b0d5fb4864888;p=scalable-opengroupware.org improved message lookup git-svn-id: http://svn.opengroupware.org/SOGo/trunk@552 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/SoObjects/Mailer/ChangeLog b/SOGo/SoObjects/Mailer/ChangeLog index 36ed42f0..ea47f5e5 100644 --- a/SOGo/SoObjects/Mailer/ChangeLog +++ b/SOGo/SoObjects/Mailer/ChangeLog @@ -1,3 +1,8 @@ +2005-02-13 Helge Hess + + * SOGoMailFolder.m: do not fetch message ids on folder traversal + (v0.9.72) + 2005-02-09 Helge Hess * v0.9.71 diff --git a/SOGo/SoObjects/Mailer/SOGoMailFolder.m b/SOGo/SoObjects/Mailer/SOGoMailFolder.m index 2e559125..83b69dcb 100644 --- a/SOGo/SoObjects/Mailer/SOGoMailFolder.m +++ b/SOGo/SoObjects/Mailer/SOGoMailFolder.m @@ -51,7 +51,7 @@ if (self->filenames != nil) return [self->filenames isNotNull] ? self->filenames : nil; - + uids = [self fetchUIDsMatchingQualifier:nil sortOrdering:@"DATE"]; if ([uids isKindOfClass:[NSException class]]) return nil; @@ -138,13 +138,19 @@ - (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag { id obj; - /* first check attributes directly bound to the application */ - if ((obj = [super lookupName:_key inContext:_ctx acquire:NO]) != nil) + if ([self isMessageKey:_key inContext:_ctx]) + /* + We assume here that _key is a number and methods are not and this is + moved above the super lookup since the super checks the + -toOneRelationshipKeys which in turn loads the message ids. + */ + return [self lookupImap4Message:_key inContext:_ctx]; + + /* check attributes directly bound to the app */ + if ((obj = [super lookupName:_key inContext:_ctx acquire:NO])) return obj; - obj = [self isMessageKey:_key inContext:_ctx] - ? [self lookupImap4Message:_key inContext:_ctx] - : [self lookupImap4Folder:_key inContext:_ctx]; + obj = [self lookupImap4Folder:_key inContext:_ctx]; if (obj != nil) return obj; diff --git a/SOGo/SoObjects/Mailer/Version b/SOGo/SoObjects/Mailer/Version index f6d238fc..19379aac 100644 --- a/SOGo/SoObjects/Mailer/Version +++ b/SOGo/SoObjects/Mailer/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=71 +SUBMINOR_VERSION:=72 # v0.9.69 requires libNGMime v4.5.210 # v0.9.55 requires libNGExtensions v4.5.136