]> git.donarmstrong.com Git - debbugs.git/blobdiff - scripts/service
include function in instalsql for bin ver/src pkg linking
[debbugs.git] / scripts / service
index 0196e266d3e17da5a242d8b9b3f2efd4989704e3..7e4c2054bcf618b4ec4eb204dbc01d300183d203 100755 (executable)
@@ -7,7 +7,6 @@
 use warnings;
 use strict;
 
-use locale;
 use POSIX qw(strftime locale_h);
 setlocale(LC_TIME, "C");
 
@@ -40,7 +39,7 @@ use Debbugs::Text qw(:templates);
 
 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);
@@ -519,7 +518,7 @@ eval{
     $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}",
@@ -574,20 +573,15 @@ sub fill_template{
      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',
                            );
 }
 
@@ -885,7 +879,7 @@ sub sendtxthelpraw {
     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'}
@@ -913,7 +907,7 @@ sub sendlynxdocraw {
     } 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'}
@@ -950,7 +944,7 @@ sub sendinfo {
     }
     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'}