From: znek Date: Thu, 14 Jul 2005 16:44:20 +0000 (+0000) Subject: explicitly set charsets for mail attachments, changed mails to include appointmentURL... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b913c56f8d32b3bc4aeee50bd3553a772dcb0e5;p=scalable-opengroupware.org explicitly set charsets for mail attachments, changed mails to include appointmentURL instead of homePageURL git-svn-id: http://svn.opengroupware.org/SOGo/trunk@760 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/SOGo.xcodeproj/project.pbxproj b/SOGo/SOGo.xcodeproj/project.pbxproj index 8032f7bd..06854919 100644 --- a/SOGo/SOGo.xcodeproj/project.pbxproj +++ b/SOGo/SOGo.xcodeproj/project.pbxproj @@ -94,8 +94,6 @@ AD2FA8DC0883CD12009A91E7 /* SOGoAptMailInvitation.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailInvitation.wo; sourceTree = ""; }; AD2FA9C50883F922009A91E7 /* SOGoAptMailUpdate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOGoAptMailUpdate.m; sourceTree = ""; }; AD2FA9C60883F92C009A91E7 /* SOGoAptMailUpdate.wo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = SOGoAptMailUpdate.wo; sourceTree = ""; }; - AD2FA9FB088401B5009A91E7 /* SOGoUser.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = SOGoUser.h; sourceTree = ""; }; - AD2FA9FC088401B5009A91E7 /* SOGoUser.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = SOGoUser.m; sourceTree = ""; }; AD2FAA4708840BB8009A91E7 /* common.make */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 5; path = common.make; sourceTree = ""; }; AD2FAA81088417AB009A91E7 /* AgenorUserDefaults.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = AgenorUserDefaults.h; sourceTree = ""; }; AD2FAA82088417AB009A91E7 /* AgenorUserDefaults.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = AgenorUserDefaults.m; sourceTree = ""; }; @@ -342,6 +340,10 @@ ADE0AC150885C45100E62D67 /* searchfield.js */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.javascript; name = searchfield.js; path = ../WebServerResources/searchfield.js; sourceTree = ""; }; ADE0AC160885C45100E62D67 /* uix.css */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = uix.css; path = ../WebServerResources/uix.css; sourceTree = ""; }; ADE0AC400885C6D300E62D67 /* homepage.js */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.javascript; path = homepage.js; sourceTree = ""; tabWidth = 2; }; + ADE0AEA20886CB3A00E62D67 /* SOGoAuthenticator.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = SOGoAuthenticator.h; sourceTree = ""; }; + ADE0AEA30886CB3A00E62D67 /* SOGoAuthenticator.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = SOGoAuthenticator.m; sourceTree = ""; }; + ADE0AEA40886CB3A00E62D67 /* SOGoUser.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = SOGoUser.h; sourceTree = ""; }; + ADE0AEA50886CB3A00E62D67 /* SOGoUser.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = SOGoUser.m; sourceTree = ""; }; ADE2C23D06B7BED40065D56F /* UIxCalWeekListview.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = UIxCalWeekListview.m; sourceTree = ""; }; ADE2C24006B7BEE60065D56F /* UIxCalWeekChartview.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = UIxCalWeekChartview.m; sourceTree = ""; }; ADE2C24A06B7BF020065D56F /* UIxCalWeekColumnsview.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = UIxCalWeekColumnsview.m; sourceTree = ""; }; @@ -367,8 +369,6 @@ E87205D00692E3D00099CBBD /* GNUmakefile.preamble */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; indentWidth = 8; path = GNUmakefile.preamble; sourceTree = ""; tabWidth = 8; }; E87205D70692E3D00099CBBD /* product.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = product.plist; sourceTree = ""; }; E87205D80692E3D00099CBBD /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; - E87205DF0692E3D00099CBBD /* SOGoAuthenticator.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = SOGoAuthenticator.h; sourceTree = ""; }; - E87205E00692E3D00099CBBD /* SOGoAuthenticator.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = SOGoAuthenticator.m; sourceTree = ""; }; E87205E10692E3D00099CBBD /* sogod.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = sogod.m; sourceTree = ""; usesTabs = 0; }; E87205ED0692E3D00099CBBD /* SOGoProductLoader.h */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = SOGoProductLoader.h; sourceTree = ""; }; E87205EE0692E3D00099CBBD /* SOGoProductLoader.m */ = {isa = PBXFileReference; fileEncoding = 5; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = SOGoProductLoader.m; sourceTree = ""; }; @@ -1083,8 +1083,12 @@ AD85C72707C4E8740036AC7A /* AgenorUserManager.m */, AD2FAA81088417AB009A91E7 /* AgenorUserDefaults.h */, AD2FAA82088417AB009A91E7 /* AgenorUserDefaults.m */, + ADE0AEA20886CB3A00E62D67 /* SOGoAuthenticator.h */, + ADE0AEA30886CB3A00E62D67 /* SOGoAuthenticator.m */, AD85C73407C4E8740036AC7A /* SOGoLRUCache.h */, AD85C73507C4E8740036AC7A /* SOGoLRUCache.m */, + ADE0AEA40886CB3A00E62D67 /* SOGoUser.h */, + ADE0AEA50886CB3A00E62D67 /* SOGoUser.m */, E87206A00692E3D10099CBBD /* SOGoObject.h */, E87206A10692E3D10099CBBD /* SOGoObject.m */, E872069C0692E3D10099CBBD /* SOGoContentObject.h */, @@ -1219,10 +1223,6 @@ AD2E1FEC07BD87CB0012FE12 /* MainUIProduct.m */, E87205ED0692E3D00099CBBD /* SOGoProductLoader.h */, E87205EE0692E3D00099CBBD /* SOGoProductLoader.m */, - E87205DF0692E3D00099CBBD /* SOGoAuthenticator.h */, - E87205E00692E3D00099CBBD /* SOGoAuthenticator.m */, - AD2FA9FB088401B5009A91E7 /* SOGoUser.h */, - AD2FA9FC088401B5009A91E7 /* SOGoUser.m */, ); name = Classes; sourceTree = ""; diff --git a/SOGo/SoObjects/Appointments/ChangeLog b/SOGo/SoObjects/Appointments/ChangeLog index be5e9604..e73587c4 100644 --- a/SOGo/SoObjects/Appointments/ChangeLog +++ b/SOGo/SoObjects/Appointments/ChangeLog @@ -1,7 +1,19 @@ 2005-07-14 Marcus Mueller + * v0.9.44 + + * SOGoAppointmentFolder.m: explicitly set encoding for text and + calendar attachment parts + + * SOGoAptMailNotification.m: added -appointmentURL accessor + + * SOGoAptMailInvitation.wo, SOGoAptMailUpdate.wo: display + -appointmentURL instead of -homePageURL + + * v0.9.43 + * SOGoAppointmentFolder.m: changed redirect from 'schedule' to - 'weekoverview' (v0.9.43) + 'weekoverview' 2005-07-14 Helge Hess diff --git a/SOGo/SoObjects/Appointments/SOGoAppointmentObject.m b/SOGo/SoObjects/Appointments/SOGoAppointmentObject.m index b232e9f0..b26772e6 100644 --- a/SOGo/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SOGo/SoObjects/Appointments/SOGoAppointmentObject.m @@ -596,18 +596,18 @@ static NSTimeZone *MET = nil; /* text part */ headerMap = [NGMutableHashMap hashMapWithCapacity:1]; - [headerMap setObject:@"text/plain" forKey:@"content-type"]; + [headerMap setObject:@"text/plain; charset=utf-8" forKey:@"content-type"]; bodyPart = [NGMimeBodyPart bodyPartWithHeader:headerMap]; - [bodyPart setBody:text]; + [bodyPart setBody:[text dataUsingEncoding:NSUTF8StringEncoding]]; /* attach text part to multipart body */ [body addBodyPart:bodyPart]; /* calendar part */ headerMap = [NGMutableHashMap hashMapWithCapacity:1]; - [headerMap setObject:@"text/calendar" forKey:@"content-type"]; + [headerMap setObject:@"text/calendar; charset=utf-8" forKey:@"content-type"]; bodyPart = [NGMimeBodyPart bodyPartWithHeader:headerMap]; - [bodyPart setBody:iCalString]; + [bodyPart setBody:[iCalString dataUsingEncoding:NSUTF8StringEncoding]]; /* attach calendar part to multipart body */ [body addBodyPart:bodyPart]; diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailInvitation.wo/SOGoAptMailInvitation.wod b/SOGo/SoObjects/Appointments/SOGoAptMailInvitation.wo/SOGoAptMailInvitation.wod index 69c6c1c7..3e37496c 100644 --- a/SOGo/SoObjects/Appointments/SOGoAptMailInvitation.wo/SOGoAptMailInvitation.wod +++ b/SOGo/SoObjects/Appointments/SOGoAptMailInvitation.wo/SOGoAptMailInvitation.wod @@ -20,7 +20,7 @@ HasHomePageURL: WOConditional { } HomePageURL: WOString { - value = homePageURL; + value = appointmentURL; escapeHTML = NO; } diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailNotification.m b/SOGo/SoObjects/Appointments/SOGoAptMailNotification.m index a7a11f2b..cbf6c372 100644 --- a/SOGo/SoObjects/Appointments/SOGoAptMailNotification.m +++ b/SOGo/SoObjects/Appointments/SOGoAptMailNotification.m @@ -75,6 +75,15 @@ static NSTimeZone *MET = nil; ASSIGN(self->homePageURL, _homePageURL); } +- (NSString *)appointmentURL { + NSString *aptUID; + + aptUID = [[self newApt] uid]; + return [NSString stringWithFormat:@"%@/Calendar/%@/view?tab=participants", + [self homePageURL], + aptUID]; +} + - (NSTimeZone *)viewTZ { if (self->viewTZ) return self->viewTZ; return MET; diff --git a/SOGo/SoObjects/Appointments/SOGoAptMailUpdate.wo/SOGoAptMailUpdate.wod b/SOGo/SoObjects/Appointments/SOGoAptMailUpdate.wo/SOGoAptMailUpdate.wod index 4ca5da74..3dccef2a 100644 --- a/SOGo/SoObjects/Appointments/SOGoAptMailUpdate.wo/SOGoAptMailUpdate.wod +++ b/SOGo/SoObjects/Appointments/SOGoAptMailUpdate.wo/SOGoAptMailUpdate.wod @@ -32,7 +32,7 @@ HasHomePageURL: WOConditional { } HomePageURL: WOString { - value = homePageURL; + value = appointmentURL; escapeHTML = NO; } diff --git a/SOGo/SoObjects/Appointments/Version b/SOGo/SoObjects/Appointments/Version index e6df4b3e..fed6879e 100644 --- a/SOGo/SoObjects/Appointments/Version +++ b/SOGo/SoObjects/Appointments/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=43 +SUBMINOR_VERSION:=44 # v0.9.42 requires libSOGo v0.9.54 # v0.9.32 requires libGDLContentStore v4.5.26