]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1338 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 24 Jan 2008 15:39:34 +0000 (15:39 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 24 Jan 2008 15:39:34 +0000 (15:39 +0000)
ChangeLog
OGoContentStore/OCSiCalFieldExtractor.m
SoObjects/Appointments/SOGoAppointmentFolder.m
UI/MailPartViewers/UIxMailPartViewer.m
UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox

index 2ca4d37de3c7925c77a6a11c54ebc53f763da0dd..2c004999f096b4d8fbff88e7050a320d8988eaf2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2008-01-24  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
+
+       * SoObjects/Appointments/SOGoAppointmentFolder.m: if c_cycleinfo
+       is an NSNull instance, we consider it to be empty and return
+       automatically with an error message in the log.
+
+       * OGoContentStore/OCSiCalFieldExtractor.m ([OCSiCalFieldExtractor
+       -extractQuickFieldsFromTodo:_task]): handle recurrence info in
+       tasks.
+
+       * UI/MailPartViewers/UIxMailPartViewer.m ([UIxMailPartViewer
+       -pathToAttachment]): in the case where the client object is not a
+       mail body part (when the message IS the attachment), we append 0
+       to generate the url, instead of the filename.
+
 2008-01-22  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
        * SoObjects/Appointments/SOGoAppointmentFolder.m
index cda920e27ec1d84ac3c08a2994c0e8fe5abdec9c..f68537f9a71f9546a192c8a966312277f6d6071d 100644 (file)
@@ -282,6 +282,14 @@ static NSNumber *distantFutureNumber = nil;
     date = [NSNull null];
   [row setObject: date forKey: @"c_enddate"];
 
+  if ([_task isRecurrent])
+    {
+      [row setObject: [self numberForDate: distantFuture]
+          forKey: @"c_cycleenddate"];
+      [row setObject: [_task cycleInfo]
+          forKey: @"c_cycleinfo"];
+    }
+
   if ([participants length] > 0)
     [row setObject:participants forKey: @"c_participants"];
   if ([partmails length] > 0)
index 190982a9db2f1fc5cfd2857d0db5c0cf90c7b40f..aec706eef6a15ee8c52302b83aa09680f95015c0 100644 (file)
@@ -634,12 +634,21 @@ static NSNumber   *sharedYes = nil;
   NGCalendarDateRange *fir;
   NSArray             *rules, *exRules, *exDates, *ranges;
   unsigned            i, count;
+  NSString *content;
 
-  cycleinfo  = [[_row objectForKey:@"c_cycleinfo"] propertyList];
-  if (cycleinfo == nil) {
-    [self errorWithFormat:@"cyclic record doesn't have cycleinfo -> %@", _row];
-    return;
-  }
+  content = [_row objectForKey: @"c_cycleinfo"];
+  if (![content isNotNull])
+    {
+      [self errorWithFormat:@"cyclic record doesn't have cycleinfo -> %@", _row];
+      return;
+    }
+
+  cycleinfo = [content propertyList];
+  if (!cycleinfo)
+    {
+      [self errorWithFormat:@"cyclic record doesn't have cycleinfo -> %@", _row];
+      return;
+    }
 
   row = [self fixupRecord:_row fetchRange: _r];
   [row removeObjectForKey: @"c_cycleinfo"];
index 96b9e50a6ed820750c13d177182c369d5987f0e4..4f3a177fba6604aeccd6b41646bb0585ca906e23 100644 (file)
   if (![url hasSuffix: @"/"])
     url = [url stringByAppendingString: @"/"];
   
-  /* if we get a message with an image/* or application/*
+  /* if we get a message with an image-* or application-*
      Content-Type, we must generate a 'fake' part since our
      decoded mail won't have any. Also see SOGoMailBodyPart: -fetchBLOB
      and SOGoMailObject: -lookupImap4BodyPartKey: inContext for
 - (NSString *) pathToAttachment
 {
   NSMutableString *url;
-  NSString *s;
+  NSString *s, *attachment;
   SOGoMailBodyPart *bodyPart;
 
   bodyPart = [self clientPart];
     [url appendString: @"/"];
 
 //   s = [[self partPath] componentsJoinedByString: @"/"];
-  [url appendString: [self _filenameForAttachment: bodyPart]];
+  if ([bodyPart isKindOfClass: [SOGoMailBodyPart class]])
+    attachment = [self _filenameForAttachment: bodyPart];
+  else
+    attachment = @"0";
+  [url appendString: attachment];
 
   return url;
 }
index 701eef9d47a7bbbb2210e04005d89b3f64e3ce18..e6a9771d0f4707a7bfa4e5d723fa71ba30f9d70e 100644 (file)
   <br />
   <br />
   -->
-  <pre style="display: none;"><var:string value="flatContentAsString" /></pre>
+  <!-- <pre style="display: none;"><var:string value="flatContentAsString" /></pre> -->
 </div>