From c86f3c99962c597813fec8dc591eaaaff594a108 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Mon, 23 Oct 2006 18:20:30 +0000 Subject: [PATCH] fix: Commerce product group bug./ Backported version tag fix to 7.1.2 --- docs/changelog/7.x.x.txt | 5 +++-- docs/upgrades/upgrade_7.1.1-7.1.2.pl | 12 ++++++++++++ docs/upgrades/upgrade_7.1.2-7.2.0.pl | 11 ----------- lib/WebGUI/Commerce/Item/Product.pm | 2 +- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index dfd50aedf..eb21563a6 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -3,12 +3,13 @@ - Added configurable sales tax. (Tiffany Patterson / Elite Marketing) - change: made Text::Aspell optional, nullifying spellchecker if not present - Fixed a bug where logging in/out would cause a blank page display. - - Fix: Version tags could not be create()d because no default values set. 7.1.2 - Fixed a bug that caused workflows to fail if collaboration systems and posts for that CS were in the same version tag at commit time. - - fix: minor assetsToHide implementation bug in dashboard + - fix: minor assetsToHide implementation bug in dashboard + - fix: Version tags could not be create()d because no default values set. + - fix: Commerce items were required to have a group. 7.1.1 - fix: some issues with asset exports not handling URLs with dots correctly diff --git a/docs/upgrades/upgrade_7.1.1-7.1.2.pl b/docs/upgrades/upgrade_7.1.1-7.1.2.pl index 8c1d3afd7..107cadcc2 100644 --- a/docs/upgrades/upgrade_7.1.1-7.1.2.pl +++ b/docs/upgrades/upgrade_7.1.1-7.1.2.pl @@ -21,6 +21,8 @@ my $quiet; # this line required my $session = start(); # this line required # upgrade functions go here +fixAssetVersionTag($session); + finish($session); # this line required @@ -32,6 +34,16 @@ finish($session); # this line required # # and here's our code #} +#------------------------------------------------- +sub fixAssetVersionTag { + my $session = shift; + print "\tFixing assetVersionTag database table.\n" unless ($quiet); + + $session->db->write("alter table assetVersionTag alter lockedBy set default ''"); + $session->db->write("alter table assetVersionTag alter groupToUse set default ''"); + $session->db->write("alter table assetVersionTag alter workflowId set default ''"); +} + # ---- DO NOT EDIT BELOW THIS LINE ---- diff --git a/docs/upgrades/upgrade_7.1.2-7.2.0.pl b/docs/upgrades/upgrade_7.1.2-7.2.0.pl index 487c43ec3..a85d7d010 100644 --- a/docs/upgrades/upgrade_7.1.2-7.2.0.pl +++ b/docs/upgrades/upgrade_7.1.2-7.2.0.pl @@ -59,17 +59,6 @@ sub createDictionaryStorage { } -#------------------------------------------------- -sub fixAssetVersionTag { - my $session = shift; - print "\tFixing assetVersionTag database table.\n" unless ($quiet); - - $session->db->write("alter table assetVersionTag alter lockedBy set default ''"); - $session->db->write("alter table assetVersionTag alter groupToUse set default ''"); - $session->db->write("alter table assetVersionTag alter workflowId set default ''"); -} - - # ---- DO NOT EDIT BELOW THIS LINE ---- #------------------------------------------------- diff --git a/lib/WebGUI/Commerce/Item/Product.pm b/lib/WebGUI/Commerce/Item/Product.pm index 883f752ba..98b53db1a 100755 --- a/lib/WebGUI/Commerce/Item/Product.pm +++ b/lib/WebGUI/Commerce/Item/Product.pm @@ -48,7 +48,7 @@ sub handler { ### Add to group action # If group is 'everyone', skip - unless ($self->{_product}->get('groupId') eq '7') { + unless ($self->{_product}->get('groupId') && $self->{_product}->get('groupId') eq '7') { my $g = WebGUI::Group->new($self->session,$self->{_product}->get('groupId')); my $expiresOffset;