From: wolfgang Date: Wed, 7 Nov 2007 22:28:14 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1245 d1b88da0-ebda-0310... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea98d6f7135704b2e8c2b0dd07a651cccf7c623e;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1245 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 59f96d69..8b2f12b5 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -106,43 +106,23 @@ NSEnumerator *e; id folder; NSException *allErrors = nil; - + NSException *error; + SOGoAppointmentObject *apt; + e = [[container lookupCalendarFoldersForUIDs:_uids inContext: context] objectEnumerator]; - while ((folder = [e nextObject]) != nil) { - NSException *error; - SOGoAppointmentObject *apt; - - if (![folder isNotNull]) /* no folder was found for given UID */ - continue; - - apt = [folder lookupName: [self nameInContainer] inContext: context - acquire: NO]; - if ([apt isKindOfClass: [NSException class]]) - { - [self logWithFormat:@"Note: an exception occured finding '%@' in folder: %@", - [self nameInContainer], folder]; - [self logWithFormat:@"the exception reason was: %@", - [(NSException *) apt reason]]; - continue; - } - - if (![apt isNotNull]) { - [self logWithFormat:@"Note: did not find '%@' in folder: %@", - [self nameInContainer], folder]; - continue; - } - if ([apt isKindOfClass: [NSException class]]) { - [self logWithFormat:@"Exception: %@", [(NSException *) apt reason]]; - continue; - } - - if ((error = [apt primarySaveContentString:_iCal]) != nil) { - [self logWithFormat:@"Note: failed to save iCal in folder: %@", folder]; - // TODO: make compound - allErrors = error; + while ((folder = [e nextObject])) + { + apt = [SOGoAppointmentObject objectWithName: nameInContainer + inContainer: folder]; + error = [apt primarySaveContentString:_iCal]; + if (error) + { + [self logWithFormat:@"Note: failed to save iCal in folder: %@", folder]; + // TODO: make compound + allErrors = error; + } } - } return allErrors; } diff --git a/SoObjects/Contacts/SOGoContactLDAPFolder.m b/SoObjects/Contacts/SOGoContactLDAPFolder.m index 65e4d11c..bc684ca3 100644 --- a/SoObjects/Contacts/SOGoContactLDAPFolder.m +++ b/SoObjects/Contacts/SOGoContactLDAPFolder.m @@ -56,7 +56,6 @@ name = [object objectForKey: @"c_name"]; componentClass = [SOGoContactLDIFEntry class]; - component = [componentClass contactEntryWithName: name withLDIFEntry: object inContainer: self];