From 0f2906fd46b9331a01edd12e4271409db8d746f8 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 19 Nov 2003 04:19:57 +0000 Subject: [PATCH] fixed subscription problem --- docs/changelog/5.x.x.txt | 2 ++ lib/WebGUI/Forum/UI.pm | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/changelog/5.x.x.txt b/docs/changelog/5.x.x.txt index 3f77d88d1..a80b264d7 100644 --- a/docs/changelog/5.x.x.txt +++ b/docs/changelog/5.x.x.txt @@ -8,6 +8,8 @@ - Fixed bug [ 843591 ] Fatal error while creating a new Message Board if there are no Forums yet. - Fixed bug [ 844196 ] Time formats + - Fixed a bug in the forum where new replies defaulted to always subscribing + the user to the thread. 5.5.1 diff --git a/lib/WebGUI/Forum/UI.pm b/lib/WebGUI/Forum/UI.pm index 05c800154..4730936c0 100644 --- a/lib/WebGUI/Forum/UI.pm +++ b/lib/WebGUI/Forum/UI.pm @@ -1773,7 +1773,7 @@ sub www_post { my ($subject, $message, $forum); my $var; $var->{'newpost.header'} = WebGUI::International::get(1064); - $var->{'newpost.isNewThread'} = ($session{form}{forumId} ne ""); + $var->{'newpost.isNewThread'} = ($session{form}{parentId} eq ""); $var->{'newpost.isReply'} = ($session{form}{parentId} ne ""); $var->{'newpost.isEdit'} = ($session{form}{forumPostId} ne ""); $var->{'user.isVisitor'} = ($session{user}{userId} == 1); @@ -1803,7 +1803,6 @@ sub www_post { value=>$session{form}{forumId} }); $forum = WebGUI::Forum->new($session{form}{forumId}); - return WebGUI::Privilege::insufficient unless ($forum->canPost); if ($forum->isModerator) { $var->{'sticky.label'} = WebGUI::International::get(1013); $var->{'sticky.form'} = WebGUI::Form::yesNo({ @@ -1815,6 +1814,7 @@ sub www_post { } if ($var->{'newpost.isNewMessage'}) { $var->{'subscribe.label'} = WebGUI::International::get(873); + return WebGUI::Privilege::insufficient unless ($forum->canPost); if ($forum->isModerator) { $var->{'lock.label'} = WebGUI::International::get(1012); $var->{'lock.form'} = WebGUI::Form::yesNo({