From 4a8e3d64a5af8ae7a82cdb7bbbc39afbf38184b4 Mon Sep 17 00:00:00 2001 From: "preed%sigkill.com" <> Date: Mon, 10 Feb 2003 06:04:08 +0000 Subject: Bug 124174 - make processmail a package (Bugzilla::BugMail), r=gerv, r=jth, a=justdave --- post_bug.cgi | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) (limited to 'post_bug.cgi') diff --git a/post_bug.cgi b/post_bug.cgi index 18b761744..2a2bcb5fa 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -457,30 +457,16 @@ if (UserInGroup("editbugs")) { } } -# Assemble the -force* strings so this counts as "Added to this capacity" -my @ARGLIST = (); -if (@cc) { - push (@ARGLIST, "-forcecc", join(",", @cc)); -} - -push (@ARGLIST, "-forceowner", DBID_to_name($::FORM{assigned_to})); +# Email everyone the details of the new bug +$vars->{'mailrecipients'} = { 'cc' => \@cc, + 'owner' => DBID_to_name($::FORM{'assigned_to'}), + 'reporter' => $::COOKIE{'Bugzilla_login'}, + 'changer' => $::COOKIE{'Bugzilla_login'} }; if (defined $::FORM{'qa_contact'}) { - push (@ARGLIST, "-forceqacontact", DBID_to_name($::FORM{'qa_contact'})); + $vars->{'mailrecipients'}->{'qa'} = DBID_to_name($::FORM{'qa_contact'}); } -push (@ARGLIST, "-forcereporter", DBID_to_name($::userid)); - -push (@ARGLIST, $id, $::COOKIE{'Bugzilla_login'}); - -# Send mail to let people know the bug has been created. -# See attachment.cgi for explanation of why it's done this way. -my $mailresults = ''; -open(PMAIL, "-|") or exec('./processmail', @ARGLIST); -$mailresults .= $_ while ; -close(PMAIL); - -# Tell the user all about it $vars->{'id'} = $id; my $bug = new Bug($id, $::userid); $vars->{'bug'} = $bug; @@ -491,19 +477,10 @@ $vars->{'sentmail'} = []; push (@{$vars->{'sentmail'}}, { type => 'created', id => $id, - mail => $mailresults }); foreach my $i (@all_deps) { - my $mail = ""; - open(PMAIL, "-|") or exec('./processmail', $i, $::COOKIE{'Bugzilla_login'}); - $mail .= $_ while ; - close(PMAIL); - - push (@{$vars->{'sentmail'}}, { type => 'dep', - id => $i, - mail => $mail - }); + push (@{$vars->{'sentmail'}}, { type => 'dep', id => $i, }); } my @bug_list; -- cgit v1.2.3-24-g4f1b