summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi13
1 files changed, 9 insertions, 4 deletions
diff --git a/attachment.cgi b/attachment.cgi
index f85fb3a19..0b389501b 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -39,6 +39,7 @@ use strict;
use lib qw(. lib);
use Bugzilla;
+use Bugzilla::BugMail;
use Bugzilla::Constants;
use Bugzilla::Error;
use Bugzilla::Flag;
@@ -532,8 +533,6 @@ sub insert {
$dbh->bz_commit_transaction;
# Define the variables and functions that will be passed to the UI template.
- $vars->{'mailrecipients'} = { 'changer' => $user->login,
- 'owner' => $owner };
$vars->{'attachment'} = $attachment;
# We cannot reuse the $bug object as delta_ts has eventually been updated
# since the object was created.
@@ -541,6 +540,9 @@ sub insert {
$vars->{'header_done'} = 1;
$vars->{'contenttypemethod'} = $cgi->param('contenttypemethod');
+ my $recipients = { 'changer' => $user->login, 'owner' => $owner };
+ $vars->{'sent_bugmail'} = Bugzilla::BugMail::Send($bugid, $recipients);
+
print $cgi->header();
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachment/created.html.tmpl", $vars)
@@ -662,10 +664,11 @@ sub update {
$dbh->bz_commit_transaction();
# Define the variables and functions that will be passed to the UI template.
- $vars->{'mailrecipients'} = { 'changer' => $user->login };
$vars->{'attachment'} = $attachment;
$vars->{'bugs'} = [$bug];
$vars->{'header_done'} = 1;
+ $vars->{'sent_bugmail'} =
+ Bugzilla::BugMail::Send($bug->id, { 'changer' => $user->login });
print $cgi->header();
@@ -714,7 +717,6 @@ sub delete_attachment {
$vars->{'attachment'} = $attachment;
$vars->{'date'} = $date;
$vars->{'reason'} = clean_text($cgi->param('reason') || '');
- $vars->{'mailrecipients'} = { 'changer' => $user->login };
$template->process("attachment/delete_reason.txt.tmpl", $vars, \$msg)
|| ThrowTemplateError($template->error());
@@ -738,6 +740,9 @@ sub delete_attachment {
$vars->{'bugs'} = [$bug];
$vars->{'header_done'} = 1;
+ $vars->{'sent_bugmail'} =
+ Bugzilla::BugMail::Send($bug->id, { 'changer' => $user->login });
+
$template->process("attachment/updated.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}