--- schemas/mysql.dump.orig Fri Aug 27 09:01:57 2004 +++ schemas/mysql.dump Fri Aug 27 09:04:36 2004 @@ -96,6 +96,9 @@ comment_commenter_id integer, comment_visible tinyint, comment_text text, + comment_subject text, + comment_parent_id integer, + comment_convert_breaks varchar(30), comment_created_on datetime not null, comment_modified_on timestamp not null, comment_created_by integer, --- lib/MT/Comment.pm.orig Fri Aug 27 09:23:26 2004 +++ lib/MT/Comment.pm Fri Aug 27 09:24:53 2004 @@ -11,13 +11,14 @@ __PACKAGE__->install_properties({ columns => [ 'id', 'blog_id', 'entry_id', 'author', 'commenter_id', - 'visible', 'email', 'url', 'text', 'ip', + 'visible', 'email', 'url', 'text', 'ip','subject', 'parent_id', 'convert_breaks' ], indexes => { ip => 1, created_on => 1, entry_id => 1, blog_id => 1, + parent_id => 1, email => 1, commenter_id => 1, visible => 1, --- lib/MT/Template/Context.pm.orig Fri Aug 27 09:26:46 2004 +++ lib/MT/Template/Context.pm Fri Aug 27 09:29:55 2004 @@ -1623,11 +1623,14 @@ my $blog = $ctx->stash('blog'); my $t = defined $c->text ? $c->text : ''; $t = munge_comment($t, $blog); + my $filter = defined $c->convert_breaks ? + [$c->convert_breaks] : + $blog->comment_text_filters; my $convert_breaks = exists $arg->{convert_breaks} ? $arg->{convert_breaks} : $blog->convert_paras_comments; return $convert_breaks ? - MT->apply_text_filters($t, $blog->comment_text_filters, $ctx) : + MT->apply_text_filters($t, $filter, $ctx) : $t; } sub _hdlr_comment_order_num { $_[0]->stash('comment_order_num') } --- lib/MT/App/Comments.pm.orig Wed Dec 15 19:51:31 2004 +++ lib/MT/App/Comments.pm Tue Dec 21 10:43:59 2004 @@ -411,6 +441,7 @@ $email = $commenter->email(); } my $url = $q->param('url') || ($commenter ? $commenter->url() : ''); + my $subject = $q->param('subject') ? $q->param('subject') : ' '; my $comment = MT::Comment->new; if ($commenter) { $comment->commenter_id($commenter->id); @@ -422,6 +453,10 @@ $comment->email(remove_html($email)); $comment->url(MT::Util::is_valid_url($url, 'stringent')); $comment->text($q->param('text')); + $comment->subject($subject); + $comment->parent_id($q->param('parent_id')); + $comment->convert_breaks($q->param('convert_breaks')); + return ($comment, $commenter); } @@ -465,6 +503,7 @@ (comment_email => $comment->email):()), comment_url => $comment->url, comment_text => $comment->text, + comment_subject => $comment->subject, unapproved => !$comment->visible(), ); my $body = MT->build_email('new-comment.tmpl', \%param); @@ -823,6 +862,8 @@ $ctx->stash('entry', $entry); $ctx->stash('commenter', $cmntr) if ($cmntr); $ctx->{current_timestamp} = $entry->created_on; + $ctx->stash('comment_parent_id', $q->param('parent_id')); + $ctx->stash('convert_breaks', $q->param('convert_breaks')); my %cond = ( EntryIfExtended => $entry->text_more ? 1 : 0, EntryIfAllowComments => $entry->allow_comments,