From 415221fb4d142f2d3f8cddb221af107e024a1ad7 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 9 Dec 2008 04:29:22 +0000 Subject: [PATCH] Forward port Calendar location field fix in ical. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/Calendar.pm | 14 ++++++++------ .../Workflow/Activity/CalendarUpdateFeeds.pm | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 73c69e850..96e5a54de 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -8,6 +8,7 @@ - fixed #9231: Singleton workflows should not report an error when an attempt is made to run them again - fixed #9244: i18n for colin - fixed #9252: Thingy defaultValue length causes input to be truncated (SDH Consulting Group) + - fixed #8937: Feeds in Calendar strip information 7.6.5 - security: A problem was discovered and fixed in which users could email executable attachments to a collaboration system and then when viewed online, could execute them. diff --git a/lib/WebGUI/Asset/Wobject/Calendar.pm b/lib/WebGUI/Asset/Wobject/Calendar.pm index f03a59a3a..28feb0e04 100644 --- a/lib/WebGUI/Asset/Wobject/Calendar.pm +++ b/lib/WebGUI/Asset/Wobject/Calendar.pm @@ -1877,13 +1877,15 @@ sub www_ical { # Summary (the title) # Wrapped at 75 columns $ical .= $self->wrapIcal("SUMMARY:".$event->get("title"))."\r\n"; - + # Description (the text) # Wrapped at 75 columns $ical .= $self->wrapIcal("DESCRIPTION:".$event->get("description"))."\r\n"; - - - + + # Location (the text) + # Wrapped at 75 columns + $ical .= $self->wrapIcal("LOCATION:".$event->get("location"))."\r\n"; + # X-WEBGUI lines if ($event->get("groupIdView")) { $ical .= "X-WEBGUI-GROUPIDVIEW:".$event->get("groupIdView")."\r\n"; @@ -1893,11 +1895,11 @@ sub www_ical { } $ical .= "X-WEBGUI-URL:".$event->get("url")."\r\n"; $ical .= "X-WEBGUI-MENUTITLE:".$event->get("menuTitle")."\r\n"; - + $ical .= qq{END:VEVENT\r\n}; } # ENDVEVENT - + $ical .= qq{END:VCALENDAR\r\n}; diff --git a/lib/WebGUI/Workflow/Activity/CalendarUpdateFeeds.pm b/lib/WebGUI/Workflow/Activity/CalendarUpdateFeeds.pm index b00306fec..9c94509f2 100644 --- a/lib/WebGUI/Workflow/Activity/CalendarUpdateFeeds.pm +++ b/lib/WebGUI/Workflow/Activity/CalendarUpdateFeeds.pm @@ -212,6 +212,7 @@ sub execute { feedId => $feed->{feedId}, description => _unwrapIcalText($events{$id}->{description}->[1]), title => _unwrapIcalText($events{$id}->{summary}->[1]), + location => _unwrapIcalText($events{$id}->{location}->[1]), menuTitle => substr($events{$id}->{summary}->[1],0,15), className => 'WebGUI::Asset::Event', isHidden => 1,