summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-11-10 02:36:02 +0100
committermkanat%bugzilla.org <>2009-11-10 02:36:02 +0100
commit5d516a6ae2f021d2e276a842c24dff74d3448c45 (patch)
treed4aebc8e20cc8d207834d36b9663b87ecf593714 /post_bug.cgi
parent88a69f2048d03b845e8e04fd23b1141df9fb8ee1 (diff)
downloadbugzilla-5d516a6ae2f021d2e276a842c24dff74d3448c45.tar.gz
bugzilla-5d516a6ae2f021d2e276a842c24dff74d3448c45.tar.xz
Bug 472217: Create a Bugzilla::Comment object and eliminate GetComments
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi8
1 files changed, 4 insertions, 4 deletions
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';