From 38f07c010bcb8d2035fe265b4ecc8b6a7184babd Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 12 Dec 2005 05:31:57 +0000 Subject: [PATCH] incorrect template variable in Mail Form --- docs/changelog/6.x.x.txt | 1 + docs/upgrades/upgrade_6.8.1-6.8.2.pl | 13 +++++++++++++ t/mandatory_template_vars.t | 4 ++++ 3 files changed, 18 insertions(+) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 04e5d8b30..d594910f9 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -3,6 +3,7 @@ - fix [ 1378493 ] 6.7.8 collab post edits (images) - Fixed bug where viewProfile did not show pretty printed values - fix [ 1344146 ] deleting recurring events doesn't work + - fix [ 1378333 ] [WG 6.7.8] Mail Form template doesn't mark required fields - fix [ 1377276 ] Calendar Pop up issue - Fixed bug/rfe where it was not obvious when hovering over the rank column in the Asset Manager that you can drag rows up and down. diff --git a/docs/upgrades/upgrade_6.8.1-6.8.2.pl b/docs/upgrades/upgrade_6.8.1-6.8.2.pl index c92900e59..50b14be0c 100644 --- a/docs/upgrades/upgrade_6.8.1-6.8.2.pl +++ b/docs/upgrades/upgrade_6.8.1-6.8.2.pl @@ -13,6 +13,7 @@ use strict; use Getopt::Long; use WebGUI::Session; use WebGUI::SQL; +use WebGUI::Asset; my $toVersion = "6.8.2"; # make this match what version you're going to @@ -22,6 +23,7 @@ my $quiet; # this line required start(); # this line required fixPosts(); +fixDataFormMailForm(); finish(); # this line required @@ -32,6 +34,17 @@ sub fixPosts { WebGUI::SQL->write("update Post set dateSubmitted=dateUpdated where dateSubmitted is null"); } +#------------------------------------------------- +sub fixDataFormMailForm { + print "\tFix bad template variable in Mail Form.\n" unless ($quiet); + my $asset = WebGUI::Asset->new("PBtmpl0000000000000020","WebGUI::Asset::Template"); + if (defined $asset) { + my $template = $asset->get("template"); + $template =~ s///g; + $asset->addRevision({template=>$template})->commit; + } +} + # ---- DO NOT EDIT BELOW THIS LINE ---- diff --git a/t/mandatory_template_vars.t b/t/mandatory_template_vars.t index 6d332dc9f..481826977 100644 --- a/t/mandatory_template_vars.t +++ b/t/mandatory_template_vars.t @@ -74,6 +74,10 @@ my @tmplVarTable = ( id => 'PBtmpl0000000000000014', vars => [ ], }, + { + id => 'PBtmpl0000000000000020', + vars => [ qw(field.isRequired) ], + }, );