last if $phline !~ m/^([\w-]+):\s*(\S.*)/;
my ($fn, $fv) = ($1, $2);
$fv =~ s/\s*$//;
+ # pluralize tag/usertag
+ $fn = $fn.'s' if $fn =~ /^(?:tag|usertag)$/;
print {$debugfh} ">$fn|$fv|\n";
$fn = lc $fn;
if ($fn =~ /^control$/) {
# set $i to beginning of encoded body data, so we can dump it out
# verbatim later
my $i = 0;
-++$i while $msg[$i] =~ /./;
+++$i while $i <= $#msg and $msg[$i] =~ /./;
$fwd .= join("\n",@msg[$i..$#msg]);
binmode($debugfh,':raw');
"X-$gProject-PR-Keywords" => $data->{keywords},
# Only have a X-$gProject-PR-Source when we know the source package
(defined($source_package) and length($source_package))?("X-$gProject-PR-Source" => $source_package):(),
+ "Reply-To" => "$ref\@$gEmailDomain",
+ "Content-Type" => 'text/plain; charset="utf-8"',
],message_body_template('mail/process_mark_as_forwarded',
{date => $header{date},
messageid => $header{'message-id'},
"X-$gProject-PR-Keywords" => $data->{keywords},
# Only have a X-$gProject-PR-Source when we know the source package
(defined($source_package) and length($source_package))?("X-$gProject-PR-Source" => $source_package):(),
+ "Reply-To" => "$ref\@$gEmailDomain",
+ "Content-Type" => 'text/plain; charset="utf-8"',
],message_body_template('mail/process_mark_as_done',
{date => $header{date},
messageid => $header{'message-id'},
if (defined $pheader{source}) {
# source packages are identified by the src: prefix
- $data->{package} = 'src:'.$pheader{source};
+ $data->{package} = $pheader{source};
+ $data->{package} =~ s/(^|,\s*)/${1}src:/g;
} elsif (defined $pheader{package}) {
$data->{package} = $pheader{package};
if ($data->{package} =~ /^src:(.+)/) {
request_subject => $header{subject},
request_nn => $nn,
request_replyto => $replyto,
- message => $msg,
+ message => [$msg],
affected_bugs => \%bug_affected,
affected_packages => \%affected_packages,
recipients => \%recipients,
address_only => 1,
cc => 1,
);
- my $error_text = $errors > 0 ? " (with $errors errors)":'';
+ my $error_text = $errors > 0 ? " (with $errors error" . ($errors > 1 ? "s" : "") . ")" : "";
my $reply =
create_mime_message(['X-Loop' => $gMaintainerEmail,
From => "$gMaintainerEmail ($gProject $gBug Tracking System)",
};
my $hole_var = {'&bugurl' =>
sub{"$_[0]: ".
- 'http://'.$config{cgi_domain}.'/'.
+ $config{cgi_domain}.'/'.
Debbugs::CGI::bug_links(bug=>$_[0],
links_only => 1,
);