From: helge Date: Sun, 15 Aug 2004 17:21:29 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/trunk@228 d1b88da0-ebda-0310-925b-ed51d... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=239ac75680f80edd9001643f9ca303598dfdb7af;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/trunk@228 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGoLogic/ChangeLog b/SOGoLogic/ChangeLog index b7f35121..5d652de0 100644 --- a/SOGoLogic/ChangeLog +++ b/SOGoLogic/ChangeLog @@ -1,3 +1,7 @@ +2004-08-15 + + * SOGoAppointmentICalRenderer.m: minor fixes to generated iCal (v0.9.8) + 2004-08-15 Helge Hess * SOGoAppointment.h: added -setAttendees: method (v0.9.7) diff --git a/SOGoLogic/SOGoAppointmentICalRenderer.m b/SOGoLogic/SOGoAppointmentICalRenderer.m index ec1d035b..c3b00f62 100644 --- a/SOGoLogic/SOGoAppointmentICalRenderer.m +++ b/SOGoLogic/SOGoAppointmentICalRenderer.m @@ -55,7 +55,7 @@ static SOGoAppointmentICalRenderer *renderer = nil; [s appendString:[calendar isNotNull] ? [calendar prodId] : @"SOGo/0.9"]; [s appendString:@"\n"]; - [s appendString:@"\nVERSION:"]; + [s appendString:@"VERSION:"]; [s appendString:[calendar isNotNull] ? [calendar version] : @"2.0"]; [s appendString:@"\n"]; } @@ -136,24 +136,25 @@ static SOGoAppointmentICalRenderer *renderer = nil; [s appendString:@"DTSTART:"]; [s appendString:[[_apt startDate] icalString]]; [s appendString:@"\n"]; + if ([_apt hasEndDate]) { [s appendString:@"DTEND:"]; [s appendString:[[_apt endDate] icalString]]; + [s appendString:@"\n"]; } if ([_apt hasDuration]) { [s appendString:@"DURATION:"]; [s appendString:[event duration]]; + [s appendString:@"\n"]; } - [s appendString:@"\n"]; [s appendString:@"STATUS:"]; [s appendString:[_apt status]]; [s appendString:@"\n"]; /* what's all this? */ - [s appendString:@"TRANSP:OPAQUE"]; /* transparency */ - [s appendString:@"\nCLASS:PRIVATE"]; /* classification [like 'top secret'] */ - [s appendString:@"\n"]; + [s appendString:@"TRANSP:OPAQUE\n"]; /* transparency */ + [s appendString:@"CLASS:PRIVATE\n"]; /* classification [like 'top secret'] */ [self addOrganizer:[_apt organizer] toString:s]; [self addAttendees:[_apt attendees] toString:s]; @@ -165,6 +166,16 @@ static SOGoAppointmentICalRenderer *renderer = nil; - (NSString *)stringForAppointment:(SOGoAppointment *)_apt { NSMutableString *s; + if ([[_apt uid] length] == 0) { + [self logWithFormat:@"WARNING: got apt without uid, rejecting iCal gen."]; + return nil; + } + if ([[[_apt startDate] icalString] length] == 0) { + [self logWithFormat: + @"WARNING: got apt without startdate, rejecting iCal gen."]; + return nil; + } + /* assume length of 1K - reasonable ? */ s = [NSMutableString stringWithCapacity:1024]; [self addPreambleForAppointment:_apt toString:s]; diff --git a/SOGoLogic/Version b/SOGoLogic/Version index cab297dc..28292b54 100644 --- a/SOGoLogic/Version +++ b/SOGoLogic/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=7 +SUBMINOR_VERSION:=8