changing dashboard stuff around.

This commit is contained in:
Matthew Wilson 2005-12-07 03:26:56 +00:00
parent 9e17031f84
commit 8442b362b7
2 changed files with 65 additions and 28 deletions

View file

@ -24,6 +24,7 @@ start(); # this line required
upgradeRichEditor();
fixCSFaqTemplateAnchors();
convertDashboardPrefs();
finish(); # this line required
@ -34,6 +35,22 @@ sub upgradeRichEditor {
rmtree("../../www/extras/tinymce");
}
#-------------------------------------------------
sub convertDashboardPrefs {
print "\tConverting Dashboard preferences\n" unless ($quiet);
#purge all Fields.
my $a = WebGUI::SQL->read("select assetId from asset where className='WebGUI::Asset::Field'");
while (my ($assetId) = $a->array) {
WebGUI::Asset::Field->new($assetId)->purge;
}
unlink("../../lib/WebGUI/Asset/Field.pm");
WebGUI::SQL->write("DROP TABLE `wgField`");
WebGUI::SQL->write("ALERT TABLE `Dashboard` DROP COLUMN mapFieldId");
WebGUI::SQL->write("ALERT TABLE `Dashboard` ADD COLUMN `isInitialized` TINYINT UNSIGNED NOT NULL DEFAULT 0");
WebGUI::SQL->write("ALERT TABLE `Dashboard` ADD COLUMN `assetsToHide` TEXT");
WebGUI::SQL->write("ALERT TABLE `Shortcut` ADD COLUMN `prefFieldsToShow` TEXT");
}
#-------------------------------------------------
sub fixCSFaqTemplateAnchors {
print "\tFix Anchors in the CS FAQ Template\n" unless ($quiet);