more bug fixes

This commit is contained in:
JT Smith 2005-08-17 21:53:54 +00:00
parent 9b37deeba2
commit 78274f1910
3 changed files with 13 additions and 7 deletions

View file

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

View file

@ -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;
}
#-------------------------------------------------

View file

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