From 1523c9c904779ee6ae26680b9917b78a8e39dc23 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sun, 6 Feb 2005 03:42:35 +0000 Subject: [PATCH] fixed another shortcut bug --- docs/upgrades/upgrade_6.2.11-6.3.0.pl | 4 ++++ lib/WebGUI/Asset/Shortcut.pm | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/upgrades/upgrade_6.2.11-6.3.0.pl b/docs/upgrades/upgrade_6.2.11-6.3.0.pl index abef2cf96..d7f1f9c29 100644 --- a/docs/upgrades/upgrade_6.2.11-6.3.0.pl +++ b/docs/upgrades/upgrade_6.2.11-6.3.0.pl @@ -96,6 +96,7 @@ WebGUI::SQL->write("alter table Product_related drop primary key"); WebGUI::SQL->write("alter table Product_related add assetId varchar(22) not null"); WebGUI::SQL->write("alter table Product_related add relatedAssetId varchar(22) not null"); WebGUI::SQL->write("alter table Product_related add primary key (assetId,relatedAssetId)"); +WebGUI::SQL->write("alter table WobjectProxy add column description mediumtext"); @@ -1088,6 +1089,9 @@ sub walkTree { # migrate submission forums # migrate submission attachments # migrate submission images + } elsif ($wobject->{namespace} eq "WobjectProxy") { + WebGUI::SQL->write("update WobjectProxy set description=".quote($wobject->{description})." where + assetId=".quote($wobjectId)); } elsif ($wobject->{namespace} eq "MessageBoard") { # migrate forums } elsif (isIn($wobject->{namespace}, qw(DataForm Poll))) { diff --git a/lib/WebGUI/Asset/Shortcut.pm b/lib/WebGUI/Asset/Shortcut.pm index 7ff36a59c..729cda570 100644 --- a/lib/WebGUI/Asset/Shortcut.pm +++ b/lib/WebGUI/Asset/Shortcut.pm @@ -67,7 +67,11 @@ sub definition { templateId=>{ fieldType=>"template", defaultValue=>"PBtmpl0000000000000140" - } + }, + description=>{ + fieldType=>"HTMLArea", + defaultValue=>undef + }, } }); return $class->SUPER::definition($definition); @@ -80,6 +84,11 @@ sub getEditForm { my $self = shift; my $tabform = $self->SUPER::getEditForm(); my $originalTemplate = WebGUI::Asset::Template->new($self->getShortcut->get("templateId")); + $tabform->getTab("properties")->HTMLArea( + -value=>$self->getValue("description"), + -label=>WebGUI::International::get(85), + -name=>"description" + ); $tabform->getTab("display")->template( -value=>$self->getValue("templateId"), -namespace=>"Shortcut"