fixed another shortcut bug

This commit is contained in:
JT Smith 2005-02-06 03:42:35 +00:00
parent d0ac36daf3
commit 1523c9c904
2 changed files with 14 additions and 1 deletions

View file

@ -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))) {

View file

@ -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"