diff --git a/lib/WebGUI/Form.pm b/lib/WebGUI/Form.pm index 0c3a4c52c..3ccd10762 100644 --- a/lib/WebGUI/Form.pm +++ b/lib/WebGUI/Form.pm @@ -300,7 +300,7 @@ sub contentType { if ($type eq "text") { $hash{text} = WebGUI::International::get(1010); } elsif ($type eq "mixed") { - $hash{code} = WebGUI::International::get(1008); + $hash{mixed} = WebGUI::International::get(1008); } elsif ($type eq "code") { $hash{code} = WebGUI::International::get(1011); } elsif ($type eq "html") { diff --git a/lib/WebGUI/Forum/Web.pm b/lib/WebGUI/Forum/Web.pm index 008d03acb..d4b7de56b 100644 --- a/lib/WebGUI/Forum/Web.pm +++ b/lib/WebGUI/Forum/Web.pm @@ -119,7 +119,7 @@ sub viewForum { my $p = WebGUI::Paginator->new($callback); $p->setDataByQuery("select * from forumThread where forumId=".$forumId." order by isSticky desc, lastPostDate desc"); my $threads = $p->getPageData; - foreach my $thread (@{$threads}) { + foreach my $thread (@$threads) { my $root = WebGUI::Forum::Post->new($thread->{rootPostId}); my $last; if ($thread->{rootPostId} == $thread->{lastPostId}) { #saves the lookup if it's the same id @@ -186,6 +186,10 @@ sub www_post { $subject = $reply->get("subject"); $subject = "Re: ".$subject unless ($subject =~ /^Re:/); + $var->{'subscribe.form'} = WebGUI::Form::yesNo({ + name=>'subscribe', + value=>0 + }); } if ($var->{isNewThread}) { $var->{'form.begin'} .= WebGUI::Form::hidden({ @@ -200,13 +204,13 @@ sub www_post { value=>0 }); } - } - if ($var->{isNewMessage}) { - $var->{'subscribe.label'} = WebGUI::International::get(873); $var->{'subscribe.form'} = WebGUI::Form::yesNo({ name=>'subscribe', value=>1 }); + } + if ($var->{isNewMessage}) { + $var->{'subscribe.label'} = WebGUI::International::get(873); if ($forum->isModerator) { $var->{'lock.label'} = WebGUI::International::get(1012); $var->{'lock.form'} = WebGUI::Form::yesNo({ diff --git a/lib/WebGUI/SQL.pm b/lib/WebGUI/SQL.pm index aecb6da1c..5eeb4e1d8 100644 --- a/lib/WebGUI/SQL.pm +++ b/lib/WebGUI/SQL.pm @@ -645,7 +645,7 @@ sub setRow { push(@pairs, $key.'='.quote($data->{$key})); } } - WebGUI::SQL->write("update $table set ".join(", ", @pairs), $dbh); + WebGUI::SQL->write("update $table set ".join(", ", @pairs)." where ".$keyColumn."=".quote($data->{$keyColumn}), $dbh); return $data->{$keyColumn}; }