From 5d516a6ae2f021d2e276a842c24dff74d3448c45 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 10 Nov 2009 01:36:02 +0000 Subject: Bug 472217: Create a Bugzilla::Comment object and eliminate GetComments Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- post_bug.cgi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'post_bug.cgi') diff --git a/post_bug.cgi b/post_bug.cgi index 323e005f4..a482913cd 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -229,13 +229,13 @@ if (defined($cgi->upload('data')) || $cgi->param('attachurl')) { # expects to find this exact string. my $new_comment = "Created an attachment (id=" . $attachment->id . ")\n" . $attachment->description . "\n"; - # We can use $bug->longdescs here because we are sure that the bug + # We can use $bug->comments here because we are sure that the bug # description is of type CMT_NORMAL. No need to include it if it's # empty, though. - if ($bug->longdescs->[0]->{'body'} !~ /^\s+$/) { - $new_comment .= "\n" . $bug->longdescs->[0]->{'body'}; + if ($bug->comments->[0]->body !~ /^\s+$/) { + $new_comment .= "\n" . $bug->comments->[0]->body; } - $bug->update_comment($bug->longdescs->[0]->{'id'}, $new_comment); + $bug->update_comment($bug->comments->[0]->id, $new_comment); } else { $vars->{'message'} = 'attachment_creation_failed'; -- cgit v1.2.3-24-g4f1b