From ea83200a34a0f5e5d6b82ec7e420b45646bdcc05 Mon Sep 17 00:00:00 2001 From: Roy Johnson Date: Thu, 7 Dec 2006 02:33:40 +0000 Subject: [PATCH] Fixing the calendar --- docs/gotcha.txt | 7 +++++++ docs/upgrades/upgrade_7.2.3-7.3.0.pl | 19 +++++++++++++------ lib/WebGUI/i18n/English/Asset_Calendar.pm | 9 +++++++-- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/docs/gotcha.txt b/docs/gotcha.txt index b1a0ba3cd..0a71d000c 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -27,6 +27,13 @@ save you many hours of grief. enable password recovery. It is highly advisable to pick several fields, as one field only is very easy to break. + There is a new Calendar wobject which replaces the current EventsCalendar + wobject. The upgrade will migrate all of your events but it will *not* + migrate any of your custom templates. All custom event calendar templates + will be *_D E L E T E D_* so make sure you have a backup if you need them. + Also, the Event List view of the calendar works a little different + than it used to. + 7.2.0 -------------------------------------------------------------------- * NOTE: if you tried to upgrade to 7.2.0 and it failed during the diff --git a/docs/upgrades/upgrade_7.2.3-7.3.0.pl b/docs/upgrades/upgrade_7.2.3-7.3.0.pl index c1a5fe1be..e6c944748 100644 --- a/docs/upgrades/upgrade_7.2.3-7.3.0.pl +++ b/docs/upgrades/upgrade_7.2.3-7.3.0.pl @@ -12,7 +12,8 @@ use lib "../../lib"; use strict; use Getopt::Long; use WebGUI::Session; - +use WebGUI::Workflow; +use WebGUI::International; my $toVersion = "7.3.0"; # make this match what version you're going to my $quiet; # this line required @@ -101,6 +102,7 @@ EOT $session->config->addToArray('assets', 'WebGUI::Asset::Wobject::WikiMaster'); } +#----------------------------------------------------- sub makeRSSFromParentAlwaysHidden { my $session = shift; print "\tHiding RSS From Parent assets.\n" unless $quiet; @@ -114,9 +116,10 @@ EOT ); } - +#------------------------------------------------- sub addNewCalendar { - my $session = shift; + my $session = shift; + my $i18n = WebGUI::International->new($session,'Asset_Calendar'); print "\tCreating Calendar and Event tables.\n" unless $quiet; $session->db->write($_) for (<<'ENDSQL', @@ -193,10 +196,14 @@ ENDSQL push @{$workflows->{None}},"WebGUI::Workflow::Activity::CalendarUpdateFeeds"; $session->config->set("workflowActivities",$workflows); - WebGUI::Workflow::new("pbworkflow000000000004")->addActivity($session,"WebGUI::Workflow::Activity::CalendarUpdateFeeds"); + # Add the Calendar Update Feeds activity to Hourly Maintenance workflow + my $workflow = WebGUI::Workflow->new($session,"pbworkflow000000000004"); + my $activity = $workflow->addActivity("WebGUI::Workflow::Activity::CalendarUpdateFeeds"); + $activity->set("title", $i18n->get("workflow updateFeeds")); + $activity->set("description", $i18n->get("workflow updateFeeds description")); } - +#------------------------------------------------- sub migrateCalendars { my $session = shift; @@ -269,7 +276,7 @@ sub migrateCalendars { } } - +#------------------------------------------------- sub removeOldCalendar { my $session = shift; print "\tRemoving old EventsCalendar tables, templates, .\n" unless $quiet; diff --git a/lib/WebGUI/i18n/English/Asset_Calendar.pm b/lib/WebGUI/i18n/English/Asset_Calendar.pm index fdb96e47c..a16e80436 100755 --- a/lib/WebGUI/i18n/English/Asset_Calendar.pm +++ b/lib/WebGUI/i18n/English/Asset_Calendar.pm @@ -268,8 +268,13 @@ our $I18N = { message => q{Update Calendar Feeds}, lastUpdated => 0, context => q{The name of the CalendarUpdateFeeds workflow activity}, - }, - + }, + + 'workflow updateFeeds description' => { + message => q{This activity imports calendar events from calendar feeds}, + lastUpdated => 0, + context => q{Description of what the Calendar Update Feeds workflow activity does}, + }, #################### ASSET NAME #################### 'assetName' => {