From a1d092cab0b0c02b437c640ee7446a5aa5272bee Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 19 Nov 2012 14:20:13 -0500 Subject: [PATCH] Fix for #2093. --- SOPE/NGCards/iCalCalendar.m | 2 +- .../Appointments/SOGoAppointmentFolderICS.m | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/SOPE/NGCards/iCalCalendar.m b/SOPE/NGCards/iCalCalendar.m index 09f629cf1..ab36e90ed 100644 --- a/SOPE/NGCards/iCalCalendar.m +++ b/SOPE/NGCards/iCalCalendar.m @@ -212,7 +212,7 @@ - (NSArray *) orderOfElements { - return [NSArray arrayWithObjects: @"prodid", @"version", @"method", @"calscale", + return [NSArray arrayWithObjects: @"prodid", @"version", @"method", @"calscale", @"x-wr-calname", @"vtimezone", @"vevent", @"vtodo", @"vjournal", @"vfreebusy", nil]; } diff --git a/SoObjects/Appointments/SOGoAppointmentFolderICS.m b/SoObjects/Appointments/SOGoAppointmentFolderICS.m index 5289327ee..2f9fd46f8 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolderICS.m +++ b/SoObjects/Appointments/SOGoAppointmentFolderICS.m @@ -1,8 +1,6 @@ /* SOGoAppointmentFolderICS.m - this file is part of SOGo * - * Copyright (C) 2010 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2010-2012 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +20,7 @@ #import +#import #import #import "SOGoAppointmentFolderICS.h" @@ -30,7 +29,19 @@ - (NSString *) contentAsString { - return [[self contentCalendar] versitString]; + iCalCalendar *cal; + CardElement *e; + NSString *s; + + cal = [self contentCalendar]; + + e = [CardElement simpleElementWithTag: @"x-wr-calname" + value: [self displayName]]; + [cal addChild: e]; + s = [cal versitString]; + [cal removeChild: e]; + + return s; } - (NSString *) davContentType