]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1284 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 29 Nov 2007 19:45:45 +0000 (19:45 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 29 Nov 2007 19:45:45 +0000 (19:45 +0000)
ChangeLog
SOPE/NGCards/ChangeLog
SOPE/NGCards/iCalDateTime.m
SoObjects/Appointments/SOGoCalendarComponent.m
SoObjects/SOGo/SOGoContentObject.m

index 716be00519c1253ac36ce81b03a0d26317b8d464..d508c9f1ea1e46274b940566b44216dd76f9b788 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2007-11-29  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
+       * SoObjects/SOGo/SOGoContentObject.m ([SOGoContentObject
+       -ocsPathOfContainer]): return the intended value, not that of
+       ocsPath...
+
+       * SoObjects/Appointments/SOGoCalendarComponent.m
+       ([SOGoCalendarComponent -sendResponseToOrganizer]): send the
+       message only of sendEMailNotifications is set.
+
        * SoObjects/SOGo/SOGoObject.m ([SOGoObject -subscriptionRoles]):
        new method that returns the roles that qualifies for adding the
        special "authorized subscribed" sogo role.
index e13917d6756207cafa1ff1af87c3ab2329429d77..3ddc72939f26b236b1479ffef1d715d8e75ac1d5 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-29  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
+
+       * iCalDateTime.m ([iCalDateTime -timeZone]): log a message if the
+       corresponding timezone isn't found.
+
 2007-11-26  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
        * iCalCalendar.m ([iCalCalendar -versitString]): same as below,
index 127be961a6a9c383605501c372091e6a22ee6224..159545e81a1243321a7b15c6781f8723c7b6ead8 100644 (file)
@@ -23,6 +23,8 @@
 #import <Foundation/NSString.h>
 #import <Foundation/NSTimeZone.h>
 
+#import <NGExtensions/NSObject+Logs.h>
+
 #import "NSCalendarDate+NGCards.h"
 #import "NSString+NGCards.h"
 
   NSString *tzId;
   iCalTimeZone *timeZone;
 
+  timeZone = nil;
+
   tzId = [self value: 0 ofAttribute: @"tzid"];
-  calendar
-    = (iCalCalendar *) [self searchParentOfClass: [iCalCalendar class]];
-  if ([tzId length] && calendar)
-    timeZone = [calendar timeZoneWithId: tzId];
-  else
-    timeZone = nil;
+  if ([tzId length])
+    {
+      calendar
+       = (iCalCalendar *) [self searchParentOfClass: [iCalCalendar class]];
+      timeZone = [calendar timeZoneWithId: tzId];
+      if (!timeZone)
+       [self logWithFormat: @"timezone '%@' not found in calendar", tzId];
+    }
 
   return timeZone;
 }
index 102749871a7e51df97cde3f3c9c50e6dfb880280..4236a6204800c88246fa6525ea54bdda4fbce95e 100644 (file)
@@ -364,79 +364,82 @@ static BOOL sendEMailNotifications = NO;
   NGMimeMultipartBody *body;
   NSData *bodyData;
 
-  event = [[self component: NO secure: NO] itipEntryWithMethod: @"reply"];
-  if (![event userIsOrganizer: [context activeUser]])
+  if (sendEMailNotifications)
     {
-      organizer = [event organizer];
-      attendee = [event findParticipant: [context activeUser]];
-      [event setAttendees: [NSArray arrayWithObject: attendee]];
-
-      /* get WOApplication instance */
-      app = [WOApplication application];
-
-      language = [[context activeUser] language];
-      /* create page name */
-      pageName
-       = [NSString stringWithFormat: @"SOGoAptMail%@ICalReply", language];
-      /* construct message content */
-      p = [app pageWithName: pageName inContext: context];
-      [p setApt: event];
-      [p setAttendee: attendee];
-
-      /* construct message */
-      headerMap = [NGMutableHashMap hashMapWithCapacity: 5];
+      event = [[self component: NO secure: NO] itipEntryWithMethod: @"reply"];
+      if (![event userIsOrganizer: [context activeUser]])
+       {
+         organizer = [event organizer];
+         attendee = [event findParticipant: [context activeUser]];
+         [event setAttendees: [NSArray arrayWithObject: attendee]];
+
+         /* get WOApplication instance */
+         app = [WOApplication application];
+
+         language = [[context activeUser] language];
+         /* create page name */
+         pageName
+           = [NSString stringWithFormat: @"SOGoAptMail%@ICalReply", language];
+         /* construct message content */
+         p = [app pageWithName: pageName inContext: context];
+         [p setApt: event];
+         [p setAttendee: attendee];
+
+         /* construct message */
+         headerMap = [NGMutableHashMap hashMapWithCapacity: 5];
           
-      /* NOTE: multipart/alternative seems like the correct choice but
-       * unfortunately Thunderbird doesn't offer the rich content alternative
-       * at all. Mail.app shows the rich content alternative _only_
-       * so we'll stick with multipart/mixed for the time being.
-       */
-      [headerMap setObject: @"multipart/mixed" forKey: @"content-type"];
-      [headerMap setObject: [attendee mailAddress] forKey: @"From"];
-      [headerMap setObject: [organizer mailAddress] forKey: @"To"];
-      mailDate = [[NSCalendarDate date] rfc822DateString];
-      [headerMap setObject: mailDate forKey: @"date"];
-      [headerMap setObject: [p getSubject] forKey: @"Subject"];
-      msg = [NGMimeMessage messageWithHeader: headerMap];
-
-      NSLog (@"sending 'REPLY' from %@ to %@",
-            [attendee mailAddress], [organizer mailAddress]);
-
-      /* multipart body */
-      body = [[NGMimeMultipartBody alloc] initWithPart: msg];
-
-      /* text part */
-      headerMap = [NGMutableHashMap hashMapWithCapacity: 1];
-      [headerMap setObject: @"text/plain; charset=utf-8"
-                forKey: @"content-type"];
-      bodyPart = [NGMimeBodyPart bodyPartWithHeader: headerMap];
-      bodyData = [[p getBody] dataUsingEncoding: NSUTF8StringEncoding];
-      [bodyPart setBody: bodyData];
-
-      /* attach text part to multipart body */
-      [body addBodyPart: bodyPart];
-
-      /* calendar part */
-      headerMap = [NGMutableHashMap hashMapWithCapacity: 1];
-      [headerMap setObject: @"text/calendar; method=REPLY; charset=utf-8"
-                forKey: @"content-type"];
-      bodyPart = [NGMimeBodyPart bodyPartWithHeader: headerMap];
-      iCalString = [[event parent] versitString];
-      [bodyPart setBody: [iCalString dataUsingEncoding: NSUTF8StringEncoding]];
-
-      /* attach calendar part to multipart body */
-      [body addBodyPart: bodyPart];
-
-      /* attach multipart body to message */
-      [msg setBody: body];
-      [body release];
-
-      /* send the damn thing */
-      email = [organizer rfc822Email];
-      [[SOGoMailer sharedMailer]
-       sendMimePart: msg
-       toRecipients: [NSArray arrayWithObject: email]
-       sender: [attendee rfc822Email]];
+         /* NOTE: multipart/alternative seems like the correct choice but
+          * unfortunately Thunderbird doesn't offer the rich content alternative
+          * at all. Mail.app shows the rich content alternative _only_
+          * so we'll stick with multipart/mixed for the time being.
+          */
+         [headerMap setObject: @"multipart/mixed" forKey: @"content-type"];
+         [headerMap setObject: [attendee mailAddress] forKey: @"From"];
+         [headerMap setObject: [organizer mailAddress] forKey: @"To"];
+         mailDate = [[NSCalendarDate date] rfc822DateString];
+         [headerMap setObject: mailDate forKey: @"date"];
+         [headerMap setObject: [p getSubject] forKey: @"Subject"];
+         msg = [NGMimeMessage messageWithHeader: headerMap];
+
+         NSLog (@"sending 'REPLY' from %@ to %@",
+                [attendee mailAddress], [organizer mailAddress]);
+
+         /* multipart body */
+         body = [[NGMimeMultipartBody alloc] initWithPart: msg];
+
+         /* text part */
+         headerMap = [NGMutableHashMap hashMapWithCapacity: 1];
+         [headerMap setObject: @"text/plain; charset=utf-8"
+                    forKey: @"content-type"];
+         bodyPart = [NGMimeBodyPart bodyPartWithHeader: headerMap];
+         bodyData = [[p getBody] dataUsingEncoding: NSUTF8StringEncoding];
+         [bodyPart setBody: bodyData];
+
+         /* attach text part to multipart body */
+         [body addBodyPart: bodyPart];
+
+         /* calendar part */
+         headerMap = [NGMutableHashMap hashMapWithCapacity: 1];
+         [headerMap setObject: @"text/calendar; method=REPLY; charset=utf-8"
+                    forKey: @"content-type"];
+         bodyPart = [NGMimeBodyPart bodyPartWithHeader: headerMap];
+         iCalString = [[event parent] versitString];
+         [bodyPart setBody: [iCalString dataUsingEncoding: NSUTF8StringEncoding]];
+
+         /* attach calendar part to multipart body */
+         [body addBodyPart: bodyPart];
+
+         /* attach multipart body to message */
+         [msg setBody: body];
+         [body release];
+
+         /* send the damn thing */
+         email = [organizer rfc822Email];
+         [[SOGoMailer sharedMailer]
+           sendMimePart: msg
+           toRecipients: [NSArray arrayWithObject: email]
+           sender: [attendee rfc822Email]];
+       }
     }
 }
 
index 1e1d0f795b08d464f2ae5404fd9bbbcd7ca49a92..c82fc58992df9f6054504854ce0f9db7d0d968b4 100644 (file)
   else
     ocsPathOfContainer = nil;
 
-  return ocsPath;
+  return ocsPathOfContainer;
 }
 
 - (GCSFolder *) ocsFolder