Fixed translation for contacts/calendar exported filename
Monotone-Parent: 35156d431d203984a125b3638bbea9d7877ed199 Monotone-Revision: 38d99d8e3c69a7b418c3c71ebadc112262ad53db Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-22T15:43:38 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
819c3bcab4
commit
9ce1b2dfb3
|
@ -56,7 +56,7 @@
|
||||||
id <WOActionResults> response;
|
id <WOActionResults> response;
|
||||||
NSArray *contactsId;
|
NSArray *contactsId;
|
||||||
NSEnumerator *uids;
|
NSEnumerator *uids;
|
||||||
NSString *uid;
|
NSString *uid, *filename;
|
||||||
id currentChild;
|
id currentChild;
|
||||||
SOGoContactGCSFolder *sourceFolder;
|
SOGoContactGCSFolder *sourceFolder;
|
||||||
NSMutableString *content;
|
NSMutableString *content;
|
||||||
|
@ -79,10 +79,13 @@
|
||||||
[content appendFormat: [[currentChild vList] ldifString]];
|
[content appendFormat: [[currentChild vList] ldifString]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
filename = [NSString stringWithFormat: @"attachment;filename=%@.ldif",
|
||||||
|
[self labelForKey: @"Contacts"]];
|
||||||
response = [context response];
|
response = [context response];
|
||||||
[response setHeader: @"text/directory; charset=utf-8"
|
[response setHeader: @"text/directory; charset=utf-8"
|
||||||
forKey: @"content-type"];
|
forKey: @"content-type"];
|
||||||
[response setHeader: @"attachment;filename=SavedContacts.ldif"
|
[response setHeader: filename
|
||||||
forKey: @"Content-Disposition"];
|
forKey: @"Content-Disposition"];
|
||||||
[response setContent: [content dataUsingEncoding: NSUTF8StringEncoding]];
|
[response setContent: [content dataUsingEncoding: NSUTF8StringEncoding]];
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
SOGoAppointmentObject *appt;
|
SOGoAppointmentObject *appt;
|
||||||
NSArray *array, *values, *fields;
|
NSArray *array, *values, *fields;
|
||||||
NSMutableString *rc;
|
NSMutableString *rc;
|
||||||
|
NSString *filename;
|
||||||
iCalCalendar *calendar, *component;
|
iCalCalendar *calendar, *component;
|
||||||
int i, count;
|
int i, count;
|
||||||
|
|
||||||
|
@ -82,11 +83,12 @@
|
||||||
if (values && [values count])
|
if (values && [values count])
|
||||||
[calendar addChildren: values];
|
[calendar addChildren: values];
|
||||||
}
|
}
|
||||||
NSLog ([calendar versitString]);
|
|
||||||
|
|
||||||
|
filename = [NSString stringWithFormat: @"attachment;filename=%@.ics",
|
||||||
|
[self labelForKey: @"Calendar"]];
|
||||||
[response setHeader: @"text/calendar; charset=utf-8"
|
[response setHeader: @"text/calendar; charset=utf-8"
|
||||||
forKey:@"content-type"];
|
forKey:@"content-type"];
|
||||||
[response setHeader: @"attachment;filename=Calendar.ics"
|
[response setHeader: filename
|
||||||
forKey: @"Content-Disposition"];
|
forKey: @"Content-Disposition"];
|
||||||
[response setContent: [[calendar versitString] dataUsingEncoding: NSUTF8StringEncoding]];
|
[response setContent: [[calendar versitString] dataUsingEncoding: NSUTF8StringEncoding]];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue