]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1245 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 7 Nov 2007 22:28:14 +0000 (22:28 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 7 Nov 2007 22:28:14 +0000 (22:28 +0000)
SoObjects/Appointments/SOGoAppointmentObject.m
SoObjects/Contacts/SOGoContactLDAPFolder.m

index 59f96d69eecfa6b878cd95928053b33335f21d9d..8b2f12b541c9e8f97fd0f72fef5c40203384383b 100644 (file)
   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;
 }
index 65e4d11c8f0ff6fc50aa44c36990c9f20420168a..bc684ca3971fe5333bec812a8898511888e82989 100644 (file)
@@ -56,7 +56,6 @@
   name = [object objectForKey: @"c_name"];
   componentClass = [SOGoContactLDIFEntry class];
 
-  
   component = [componentClass contactEntryWithName: name
                              withLDIFEntry: object  inContainer: self];