From 722e49c281b832dabfd0d7c5d01516b2c8fc4627 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 6 May 2009 15:44:55 +0000 Subject: [PATCH] Forward porting CS default post received templateId fix for the db. --- docs/changelog/7.x.x.txt | 3 ++- docs/upgrades/upgrade_7.5.24-7.6.0.pl | 2 +- docs/upgrades/upgrade_7.5.40-7.6.10.pl | 2 +- docs/upgrades/upgrade_7.7.5-7.7.6.pl | 16 ++++++++++++++-- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 8fa5cb22f..6c49f363b 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -3,7 +3,8 @@ - Added support for template attachments; scripts and stylesheets that will be included using style->setScript and setLink instead of just using raw head tags. - - fixed: #10322: Dataform: wrong attr on script tag + - fixed #10322: Dataform: wrong attr on script tag + - fixed #10336: postReceivedTemplateId not corrected in upgrade_7.6.0-7.6.1 (Jukka Raimovaara / Axxion Oy) 7.7.5 - Adding StoryManager. diff --git a/docs/upgrades/upgrade_7.5.24-7.6.0.pl b/docs/upgrades/upgrade_7.5.24-7.6.0.pl index b19ffe5ed..524c76cf0 100644 --- a/docs/upgrades/upgrade_7.5.24-7.6.0.pl +++ b/docs/upgrades/upgrade_7.5.24-7.6.0.pl @@ -570,7 +570,7 @@ sub addEMSBadgeTemplate { sub addCSPostReceivedTemplate { my $session = shift; print "\tAdding Post Received Template ID field for CS..." unless $quiet; - $session->db->write("ALTER TABLE Collaboration ADD COLUMN postReceivedTemplateId VARCHAR(22) DEFAULT 'default-post-received';"); + $session->db->write("ALTER TABLE Collaboration ADD COLUMN postReceivedTemplateId VARCHAR(22) DEFAULT 'default_post_received';"); print "Done.\n" unless $quiet; } diff --git a/docs/upgrades/upgrade_7.5.40-7.6.10.pl b/docs/upgrades/upgrade_7.5.40-7.6.10.pl index 3d368a284..07b804ed4 100644 --- a/docs/upgrades/upgrade_7.5.40-7.6.10.pl +++ b/docs/upgrades/upgrade_7.5.40-7.6.10.pl @@ -1739,7 +1739,7 @@ sub fixIsPublicOnTemplates { sub addCSPostReceivedTemplate { my $session = shift; print "\tAdding Post Received Template ID field for CS..." unless $quiet; - $session->db->write("ALTER TABLE Collaboration ADD COLUMN postReceivedTemplateId VARCHAR(22) DEFAULT 'default-post-received';"); + $session->db->write("ALTER TABLE Collaboration ADD COLUMN postReceivedTemplateId VARCHAR(22) DEFAULT 'default_post_received';"); print "Done.\n" unless $quiet; } diff --git a/docs/upgrades/upgrade_7.7.5-7.7.6.pl b/docs/upgrades/upgrade_7.7.5-7.7.6.pl index 8be015eef..8a5a7815e 100644 --- a/docs/upgrades/upgrade_7.7.5-7.7.6.pl +++ b/docs/upgrades/upgrade_7.7.5-7.7.6.pl @@ -23,16 +23,15 @@ use WebGUI::Session; use WebGUI::Storage; use WebGUI::Asset; - my $toVersion = "7.7.6"; my $quiet; - my $session = start(); # upgrade functions go here addTemplateAttachmentsTable($session); revertUsePacked( $session ); +fixDefaultPostReceived($session); addEuVatDbColumns( $session ); finish($session); @@ -78,6 +77,19 @@ sub revertUsePacked { print "DONE!\n" unless $quiet; } +#---------------------------------------------------------------------------- +# Describe what our function does +sub fixDefaultPostReceived { + my $session = shift; + $session->db->write(<db->write(<