Bug 192513: importxml.pl and move.pl now use the new mail routines introduced in…

Bug 192513: importxml.pl and move.pl now use the new mail routines introduced in bug 124174 (they got broken when processmail was removed). Also fixes several comments referring to processmail (which no longer exists) in other files, and removes references to processmail from the .htaccess files and the executable file list in checksetup.pl. r= jaypee, a= justdave
parent cdc6e3a1
...@@ -821,7 +821,7 @@ if ($my_create_htaccess) { ...@@ -821,7 +821,7 @@ if ($my_create_htaccess) {
open HTACCESS, ">.htaccess"; open HTACCESS, ">.htaccess";
print HTACCESS <<'END'; print HTACCESS <<'END';
# don't allow people to retrieve non-cgi executable files or our private data # don't allow people to retrieve non-cgi executable files or our private data
<FilesMatch ^(.*\.pl|.*localconfig.*|processmail|runtests.sh)$> <FilesMatch ^(.*\.pl|.*localconfig.*|runtests.sh)$>
deny from all deny from all
</FilesMatch> </FilesMatch>
<FilesMatch ^(localconfig.js|localconfig.rdf)$> <FilesMatch ^(localconfig.js|localconfig.rdf)$>
...@@ -1107,7 +1107,7 @@ WriteParams(); ...@@ -1107,7 +1107,7 @@ WriteParams();
# #
# These are the files which need to be marked executable # These are the files which need to be marked executable
my @executable_files = ('processmail', 'whineatnews.pl', 'collectstats.pl', my @executable_files = ('whineatnews.pl', 'collectstats.pl',
'checksetup.pl', 'importxml.pl', 'runtests.sh'); 'checksetup.pl', 'importxml.pl', 'runtests.sh');
# tell me if a file is executable. All CGI files and those in @executable_files # tell me if a file is executable. All CGI files and those in @executable_files
......
...@@ -62,6 +62,7 @@ use lib ($::path); ...@@ -62,6 +62,7 @@ use lib ($::path);
use XML::Parser; use XML::Parser;
use Data::Dumper; use Data::Dumper;
$Data::Dumper::Useqq = 1; $Data::Dumper::Useqq = 1;
use Bugzilla::BugMail;
require "CGI.pl"; require "CGI.pl";
require "globals.pl"; require "globals.pl";
...@@ -648,7 +649,7 @@ for (my $k=1 ; $k <= $bugqty ; $k++) { ...@@ -648,7 +649,7 @@ for (my $k=1 ; $k <= $bugqty ; $k++) {
$log .= "\n\n\n"; $log .= "\n\n\n";
} }
system("./processmail", $id, $exporter); Bugzilla::BugMail::Send($id, { 'changer' => $exporter });
} }
my $subject = "$bugqty bug(s) successfully moved from $urlbase to " my $subject = "$bugqty bug(s) successfully moved from $urlbase to "
......
...@@ -30,6 +30,7 @@ require "CGI.pl"; ...@@ -30,6 +30,7 @@ require "CGI.pl";
use vars qw($template $userid %COOKIE); use vars qw($template $userid %COOKIE);
use Bug; use Bug;
use Bugzilla::BugMail;
$::lockcount = 0; $::lockcount = 0;
...@@ -132,7 +133,7 @@ foreach my $id (split(/:/, $::FORM{'buglist'})) { ...@@ -132,7 +133,7 @@ foreach my $id (split(/:/, $::FORM{'buglist'})) {
"($id, $exporterid, now(), " . SqlQuote($comment) . ")"); "($id, $exporterid, now(), " . SqlQuote($comment) . ")");
print "<P>Bug $id moved to " . Param("move-to-url") . ".<BR>\n"; print "<P>Bug $id moved to " . Param("move-to-url") . ".<BR>\n";
system("./processmail", $id, $exporter); Bugzilla::BugMail::Send($id, { 'changer' => $exporter });
} }
} }
print "<P>\n"; print "<P>\n";
......
...@@ -205,7 +205,7 @@ my %ccids; ...@@ -205,7 +205,7 @@ my %ccids;
my @cc; my @cc;
# Create the ccid hash for inserting into the db # Create the ccid hash for inserting into the db
# and the list for passing to processmail # and the list for passing to Bugzilla::BugMail::Send
# use a hash rather than a list to avoid adding users twice # use a hash rather than a list to avoid adding users twice
if (defined $::FORM{'cc'}) { if (defined $::FORM{'cc'}) {
foreach my $person (split(/[ ,]/, $::FORM{'cc'})) { foreach my $person (split(/[ ,]/, $::FORM{'cc'})) {
......
...@@ -1398,7 +1398,7 @@ foreach my $id (@idlist) { ...@@ -1398,7 +1398,7 @@ foreach my $id (@idlist) {
@ccRemoved = @removed; @ccRemoved = @removed;
} }
# We need to run processmail for dependson/blocked bugs if the dependencies # We need to send mail for dependson/blocked bugs if the dependencies
# change or the status or resolution change. This var keeps track of that. # change or the status or resolution change. This var keeps track of that.
my $check_dep_bugs = 0; my $check_dep_bugs = 0;
...@@ -1586,7 +1586,7 @@ foreach my $id (@idlist) { ...@@ -1586,7 +1586,7 @@ foreach my $id (@idlist) {
$newhash{$col} = $newvalues[$i]; $newhash{$col} = $newvalues[$i];
$i++; $i++;
} }
# for passing to processmail to ensure that when someone is removed # for passing to Bugzilla::BugMail to ensure that when someone is removed
# from one of these fields, they get notified of that fact (if desired) # from one of these fields, they get notified of that fact (if desired)
# #
my $origOwner = ""; my $origOwner = "";
...@@ -1612,8 +1612,8 @@ foreach my $id (@idlist) { ...@@ -1612,8 +1612,8 @@ foreach my $id (@idlist) {
$col = 'component'; $col = 'component';
} }
# save off the old value for passing to processmail so the old # save off the old value for passing to Bugzilla::BugMail so
# owner can be notified # the old owner can be notified
# #
if ($col eq 'assigned_to') { if ($col eq 'assigned_to') {
$old = ($old) ? DBID_to_name($old) : ""; $old = ($old) ? DBID_to_name($old) : "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment