From 2e791c9dd5fb0bcc7e25432c49ab2eaf5c3543cd Mon Sep 17 00:00:00 2001 From: JT Smith Date: Mon, 12 Jul 2004 01:24:41 +0000 Subject: [PATCH] merging some 5.5 changes and various bugfixes --- docs/changelog/5.x.x.txt | 3 +++ docs/changelog/6.x.x.txt | 1 + docs/upgrades/upgrade_5.5.6-5.5.7.sql | 4 ++++ .../{upgrade_5.5.6-5.9.9.sql => upgrade_5.5.7-5.9.9.sql} | 0 lib/WebGUI/Forum/Post.pm | 8 +++----- lib/WebGUI/Wobject/DataForm.pm | 3 +++ 6 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 docs/upgrades/upgrade_5.5.6-5.5.7.sql rename docs/upgrades/{upgrade_5.5.6-5.9.9.sql => upgrade_5.5.7-5.9.9.sql} (100%) diff --git a/docs/changelog/5.x.x.txt b/docs/changelog/5.x.x.txt index e4d4feba0..fefabf652 100644 --- a/docs/changelog/5.x.x.txt +++ b/docs/changelog/5.x.x.txt @@ -15,6 +15,9 @@ - bugfix [ 938266 ] Fix: 5.5.4 Synopsis ignores hideFromNav (Thanks to Nicklous Roberts.) - bugfix [ 961056 ] pages erroneously owned by visitor + - bugfix [ 913847 ] Minutes on times can not be updated. + - bugfix [ 939070 ] 5.5.4: Macros do not work in DataForm fields + 5.5.6 diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 629b927c1..61de63392 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -81,6 +81,7 @@ - Dropped page tree caching and stepped onto Navigation caching. This helps scalability a lot. Thanks to Martin Kamerbeek / Procolix - bugfix [ 977201 ] ws client bug + - bugfix [ 969740 ] Messageboard: Deleting of postings diff --git a/docs/upgrades/upgrade_5.5.6-5.5.7.sql b/docs/upgrades/upgrade_5.5.6-5.5.7.sql new file mode 100644 index 000000000..e8436d21f --- /dev/null +++ b/docs/upgrades/upgrade_5.5.6-5.5.7.sql @@ -0,0 +1,4 @@ +insert into webguiVersion values ('5.5.7','upgrade',unix_timestamp()); +update page set ownerId=3 where ownerId=1; + + diff --git a/docs/upgrades/upgrade_5.5.6-5.9.9.sql b/docs/upgrades/upgrade_5.5.7-5.9.9.sql similarity index 100% rename from docs/upgrades/upgrade_5.5.6-5.9.9.sql rename to docs/upgrades/upgrade_5.5.7-5.9.9.sql diff --git a/lib/WebGUI/Forum/Post.pm b/lib/WebGUI/Forum/Post.pm index 95aa2e7c8..be29f0db8 100644 --- a/lib/WebGUI/Forum/Post.pm +++ b/lib/WebGUI/Forum/Post.pm @@ -471,11 +471,9 @@ sub setStatusDeleted { $self->set({status=>'deleted'}); $self->getThread->decrementReplies; $self->getThread->setStatusDeleted if ($self->getThread->get("rootPostId") == $self->get("forumPostId")); - if ($self->getThread->get("lastPostId") == $self->get("forumPostId")) { - my ($id, $date) = WebGUI::SQL->quickArray("select forumPostId,dateOfPost from forumPost where forumThreadId=" - .$self->get("forumThreadId")." and status='approved'"); - $self->getThread->setLastPost($date,$id); - } + my ($id, $date) = WebGUI::SQL->quickArray("select forumPostId,dateOfPost from forumPost where forumThreadId=" + .$self->get("forumThreadId")." and status='approved'"); + $self->getThread->setLastPost($date,$id); } #------------------------------------------------------------------- diff --git a/lib/WebGUI/Wobject/DataForm.pm b/lib/WebGUI/Wobject/DataForm.pm index 409f30e29..07e46214a 100644 --- a/lib/WebGUI/Wobject/DataForm.pm +++ b/lib/WebGUI/Wobject/DataForm.pm @@ -864,6 +864,9 @@ sub www_process { $hadErrors = 1; delete $var->{entryId}; } + if ($row{status} eq "hidden") { + $value = WebGUI::Macro::process($row{defaultValue}); + } unless ($hadErrors) { my ($exists) = WebGUI::SQL->quickArray("select count(*) from DataForm_entryData where DataForm_entryId=$entryId and DataForm_fieldId=".quote($row{DataForm_fieldId}));