use Scalar::Util qw(looks_like_number);
-use List::AllUtils qw(first);
+use List::AllUtils qw(first uniqnum);
use Mail::RFC822::Address;
use Encode qw(decode encode);
} else {
print {$transcript} "Usertags were: " . join(" ", @oldtags) . ".\n";
}
- print {$transcript} "Usertags are now: " . join(" ", @newtags) . ".\n";
+ if (@newtags == 0) {
+ print {$transcript} "There are now no usertags set.\n";
+ } else {
+ print {$transcript} "Usertags are now: " . join(" ", @newtags) . ".\n";
+ }
Debbugs::User::write_usertags(\%ut, $user);
}
} elsif (!$control) {
$temp_transcript = decode("utf8",$temp_transcript,Encode::FB_CROAK);
};
my $reply =
- create_mime_message([From => "$gMaintainerEmail ($gProject $gBug Tracking System)",
+ create_mime_message([From => qq("$gProject $gBug Tracking System" <$gMaintainerEmail>),
To => $replyto,
@maintccs ? (Cc => join(', ',@maintccs)):(),
Subject => "Processed${error_text}: $header{subject}",
my $variables = {config => \%config,
defined($ref)?(ref => $ref):(),
defined($data)?(data => $data):(),
- refs => [map {exists $clonebugs{$_}?$clonebugs{$_}:$_} keys %bug_affected],
+ refs => [sort
+ uniqnum(defined($ref)?($ref):(),
+ map {exists $clonebugs{$_}?$clonebugs{$_}:$_}
+ keys %bug_affected)],
%{$extra_var},
};
- my $hole_var = {'&bugurl' =>
- sub{"$_[0]: ".
- $config{cgi_domain}.'/'.
- Debbugs::CGI::bug_links(bug=>$_[0],
- links_only => 1,
- );
- }
- };
return fill_in_template(template => $template,
variables => $variables,
- hole_var => $hole_var,
+ output_type => 'text',
);
}
close(D);
print {$transcript} "Sending $description in separate message.\n";
&sendmailmessage(<<END.$doc,$replyto);
-From: $gMaintainerEmail ($gProject $gBug Tracking System)
+From: "$gProject $gBug Tracking System" <$gMaintainerEmail>
To: $replyto
Subject: $gProject $gBug help: $description
References: $header{'message-id'}
} else {
print {$transcript} "Sending $description.\n";
&sendmailmessage(<<END.$doc,$replyto);
-From: $gMaintainerEmail ($gProject $gBug Tracking System)
+From: "$gProject $gBug Tracking System" <$gMaintainerEmail>
To: $replyto
Subject: $gProject $gBugs information: $description
References: $header{'message-id'}
}
print {$transcript} "Sending $description.\n";
&sendmailmessage(<<END.$doc,$replyto);
-From: $gMaintainerEmail ($gProject $gBug Tracking System)
+From: "$gProject $gBug Tracking System" <$gMaintainerEmail>
To: $replyto
Subject: $gProject $gBugs information: $description
References: $header{'message-id'}