From 0ed496a8759251afb5862eb7c379e66d0fdf11c1 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Tue, 10 Aug 2010 12:40:50 -0500 Subject: [PATCH] fix 11771 Default newsletter template not set Pro tip: Never do what I just did. Ever. 8 removes the need for it. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/Collaboration/Newsletter.pm | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 043324384..bf5d33982 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -9,6 +9,7 @@ - fixed #11769: WebGUI::Asset::File::ZipArchive specifies a default template of '' - fixed #11758: formatting on account stuff is wrong - fixed #11770: Starter needs to set all account plugins + - fixed #11771: Default Newsletter template not set 7.9.10 - fixed #11721: spamStopWords not in WebGUI.conf.original diff --git a/lib/WebGUI/Asset/Wobject/Collaboration/Newsletter.pm b/lib/WebGUI/Asset/Wobject/Collaboration/Newsletter.pm index d098ce819..febbce785 100644 --- a/lib/WebGUI/Asset/Wobject/Collaboration/Newsletter.pm +++ b/lib/WebGUI/Asset/Wobject/Collaboration/Newsletter.pm @@ -92,7 +92,16 @@ sub definition { className=>'WebGUI::Asset::Wobject::Collaboration::Newsletter', properties=>\%properties }); - return $class->SUPER::definition($session, $definition); + $class->SUPER::definition($session, $definition); + + # Change the default Collaboration template + for my $def ( @$definition ) { + if ( exists $def->{properties}->{collaborationTemplateId} ) { + $def->{properties}->{collaborationTemplateId}->{defaultValue} = 'newslettercs0000000001'; + } + } + + return $definition; }