summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-04-04 22:52:41 +0200
committerlpsolit%gmail.com <>2007-04-04 22:52:41 +0200
commit1afb5b3bb0ac579fdd1616f701b27038feb5a375 (patch)
treefbe744149ea8bb87949f4357b007f6a356415194 /post_bug.cgi
parent52c8d09da827fbbbc4e7c34eb6c92d1408c64fb0 (diff)
downloadbugzilla-1afb5b3bb0ac579fdd1616f701b27038feb5a375.tar.gz
bugzilla-1afb5b3bb0ac579fdd1616f701b27038feb5a375.tar.xz
Bug 376497: validateID() should return an attachment object - Patch by Frédéric Buclin <LpSolit@gmail.com> 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 f755934ae..7d01ab62d 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -187,15 +187,15 @@ if (defined $cgi->param('version')) {
# Add an attachment if requested.
if (defined($cgi->upload('data')) || $cgi->param('attachurl')) {
$cgi->param('isprivate', $cgi->param('commentprivacy'));
- my $attach_id = Bugzilla::Attachment->insert_attachment_for_bug(!THROW_ERROR,
+ my $attachment = Bugzilla::Attachment->insert_attachment_for_bug(!THROW_ERROR,
$bug, $user, $timestamp, \$vars);
- if ($attach_id) {
+ if ($attachment) {
# Update the comment to include the new attachment ID.
# This string is hardcoded here because Template::quoteUrls()
# expects to find this exact string.
- my $new_comment = "Created an attachment (id=$attach_id)\n" .
- $cgi->param('description') . "\n";
+ 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
# description is of type CMT_NORMAL. No need to include it if it's
# empty, though.