]> git.donarmstrong.com Git - debbugs.git/blobdiff - scripts/service
assume unknown encodings are UTF-8
[debbugs.git] / scripts / service
index 10fbbc0a2488c3abc6f772e790bb2e0b5231e21f..a14691aa1c64b5ae84ad130ecf15898ae24794ed 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::Util qw(first);
+use List::AllUtils qw(first);
 
 use Mail::RFC822::Address;
 use Encode qw(decode encode);
@@ -285,7 +284,7 @@ for ($procline=0; $procline<=$#bodylines; $procline++) {
     } elsif (m/^subscribe/i) {
         print {$transcript} <<END;
 There is no $gProject $gBug mailing list.  If you wish to review bug reports
-please do so via http://$gWebDomain/ or ask this mail server
+please do so via $gWebDomain or ask this mail server
 to send them to you.
 soon: MAILINGLISTS_TEXT
 END
@@ -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}",
@@ -579,7 +578,7 @@ sub fill_template{
                     };
      my $hole_var = {'&bugurl' =>
                     sub{"$_[0]: ".
-                             'http://'.$config{cgi_domain}.'/'.
+                             $config{cgi_domain}.'/'.
                                   Debbugs::CGI::bug_links(bug=>$_[0],
                                                           links_only => 1,
                                                          );
@@ -885,7 +884,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'}
@@ -901,7 +900,7 @@ END
 sub sendlynxdocraw {
     my ($relpath,$description) = @_;
     $doc='';
-    open(L,"lynx -nolist -dump http://$gCGIDomain/\Q$relpath\E 2>&1 |") || die "fork for lynx: $!";
+    open(L,"lynx -nolist -dump $gCGIDomain/\Q$relpath\E 2>&1 |") || die "fork for lynx: $!";
     while(<L>) { $doc.=$_; }
     $!=0; close(L);
     if ($? == 255 && $doc =~ m/^\n*lynx: Can\'t access start file/) {
@@ -913,7 +912,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 +949,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'}