From 78274f1910f1b0c27e9aca8ce9501d2461afb592 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 17 Aug 2005 21:53:54 +0000 Subject: [PATCH] more bug fixes --- docs/changelog/6.x.x.txt | 2 ++ docs/upgrades/upgrade_6.7.0-6.7.1.pl | 16 ++++++++++------ lib/WebGUI/Asset/RichEdit.pm | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 6550bb12e..2409c4f60 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -13,6 +13,8 @@ - fixed a fatal error in whatNext.pm (mwilson) - Fixed a bug in the new versioning system where new revisions would sometimes not get their properties copied from the previous revision. + - Set the rich editor to use a bigger font by default if no style sheet + specifically setting it was called. 6.7.0 diff --git a/docs/upgrades/upgrade_6.7.0-6.7.1.pl b/docs/upgrades/upgrade_6.7.0-6.7.1.pl index 7e72cd4a2..8438c0be6 100644 --- a/docs/upgrades/upgrade_6.7.0-6.7.1.pl +++ b/docs/upgrades/upgrade_6.7.0-6.7.1.pl @@ -26,7 +26,7 @@ WebGUI::Session::refreshUserInfo(3); WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); fixForumRichEdit(); -fixMissingThreadIds(); +fixMissingThreadData(); WebGUI::Session::close(); @@ -41,18 +41,22 @@ sub fixForumRichEdit { #------------------------------------------------- -sub fixMissingThreadIds { - print "\tFixing missing thread ids.\n" unless ($quiet); +sub fixMissingThreadData { + print "\tFixing missing thread data.\n" unless ($quiet); my $sth = WebGUI::SQL->read("select assetId from Post where threadId=''"); while (my ($assetId) = $sth->array) { - print $assetId."\t"; my $threadId = getThreadId($assetId); - print $threadId."\n"; my $sql = "update Post set threadId=".quote($threadId)." where assetId=".quote($assetId); - #print $sql."\n"; WebGUI::SQL->write($sql); } $sth->finish; +my $sth = WebGUI::SQL->read("select assetId from assetData where ownerUserId=''"); +while (my ($assetId) = $sth->array) { + my ($userId, $viewGroup, $editGroup, $startDate, $endDate) = WebGUI::SQL->quickArray("select ownerUserId,groupIdView,groupIdEdit,startDate,endDate from assetData where assetId=".quote($assetId)." order by revisionDate asc limit 1"); + my $sql = "update assetData set ownerUserId=".quote($userId).", groupIdView=".quote($viewGroup).", groupIdEdit=".quote($editGroup).", startDate=".quote($startDate).", endDate=".quote($endDate)." where assetId=".quote($assetId); + WebGUI::SQL->write($sql); +} +$sth->finish; } #------------------------------------------------- diff --git a/lib/WebGUI/Asset/RichEdit.pm b/lib/WebGUI/Asset/RichEdit.pm index c88508e32..a0d8a6056 100644 --- a/lib/WebGUI/Asset/RichEdit.pm +++ b/lib/WebGUI/Asset/RichEdit.pm @@ -463,7 +463,7 @@ sub getRichEditor { $language = WebGUI::International::getLanguage("English","languageAbbreviation"); } $config{language} = $language; - $config{content_css} = $self->getValue("cssFile") if ($self->getValue("cssFile") ne ""); + $config{content_css} = $self->getValue("cssFile") || $session{config}{extrasURL}.'/tinymce/defaultcontent.css'; $config{width} = $self->getValue("editorWidth") if ($self->getValue("editorWidth") > 0); $config{height} = $self->getValue("editorHeight") if ($self->getValue("editorHeight") > 0); $config{plugins} = join(",",@plugins);