diff --git a/docs/upgrades/convert-db-to-innodb.sql b/docs/upgrades/convert-db-to-innodb.sql index 9bfecaded..e1b3177e0 100644 --- a/docs/upgrades/convert-db-to-innodb.sql +++ b/docs/upgrades/convert-db-to-innodb.sql @@ -165,7 +165,7 @@ CREATE TABLE `DataForm_inno` ( `fieldConfiguration` longtext, `tabConfiguration` longtext, `workflowIdAddEntry` char(22) character set utf8 collate utf8_bin default NULL, - `htmlAreaRichEditor` char(22) character set utf8 collate utf8_bin default '**Use_Default_Editor**', + `htmlAreaRichEditor` char(22) character set utf8 collate utf8_bin default NULL, PRIMARY KEY (`assetId`,`revisionDate`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -3411,6 +3411,7 @@ alter table Dashboard add foreign key (assetId,revisionDate) references wobject( alter table Dashboard add foreign key (adminsGroupId) references groups(groupId) on delete restrict on update cascade; alter table Dashboard add foreign key (usersGroupId) references groups(groupId) on delete restrict on update cascade; alter table Dashboard add foreign key (templateId) references asset(assetId) on delete restrict on update cascade; +update DataForm set htmlAreaRichEditor=null where htmlAreaRichEditor='**Use_Default_Editor**'; alter table DataForm add foreign key (assetId,revisionDate) references wobject(assetId,revisionDate) on delete cascade on update cascade; alter table DataForm add foreign key (emailTemplateId) references asset(assetId) on delete restrict on update cascade; alter table DataForm add foreign key (acknowlegementTemplateId) references asset(assetId) on delete restrict on update cascade; @@ -3418,7 +3419,7 @@ alter table DataForm add foreign key (listTemplateId) references asset(assetId) alter table DataForm add foreign key (templateId) references asset(assetId) on delete restrict on update cascade; alter table DataForm add foreign key (groupToViewEntries) references groups(groupId) on delete restrict on update cascade; alter table DataForm add foreign key (workflowIdAddEntry) references Workflow(workflowId) on delete set null on update cascade; -alter table DataForm add foreign key (htmlAreaRichEditor) references asset(assetId) on delete restrict on update cascade; +alter table DataForm add foreign key (htmlAreaRichEditor) references asset(assetId) on delete set null on update cascade; alter table DataForm_entry add foreign key (userId) references users(userId) on delete set null on update cascade; alter table DataForm_entry add foreign key (assetId) references asset(assetId) on delete cascade on update cascade; alter table DataTable add foreign key (assetId,revisionDate) references wobject(assetId,revisionDate) on delete cascade on update cascade; diff --git a/lib/WebGUI/Asset/Wobject/DataForm.pm b/lib/WebGUI/Asset/Wobject/DataForm.pm index 79aeffdf6..ea128b1cb 100644 --- a/lib/WebGUI/Asset/Wobject/DataForm.pm +++ b/lib/WebGUI/Asset/Wobject/DataForm.pm @@ -75,7 +75,7 @@ sub _createForm { elsif ( $class->isa('WebGUI::Form::List') ) { delete $param{size}; } - elsif ( $type eq 'HTMLArea' && $data->{htmlAreaRichEditor} ne '**Use_Default_Editor**') { + elsif ( $type eq 'HTMLArea' && $data->{htmlAreaRichEditor} ne '') { $param{richEditId} = $data->{htmlAreaRichEditor} ; } return $class->new($session, \%param); @@ -307,7 +307,6 @@ sub definition { # populate hash of Rich Editors and add an entry to the list to use the default my $selectRichEditor = WebGUI::Form::SelectRichEditor->new($session,{}) ; my $richEditorOptions = $selectRichEditor->getOptions() ; - $richEditorOptions->{'**Use_Default_Editor**'} = $i18n->get("Use Default Rich Editor"); tie %properties, 'Tie::IxHash'; %properties = (