X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fservice;h=c62e3d59e7c632d1457dbf26fd4dce8831ddd146;hb=07128905acc67b85d91ab2070dc172ac0152905f;hp=fe911442d50b6fb4a3f6683b3db63911000b6923;hpb=907fa43dbb9e516daba3ceded78dbafab29d09e5;p=debbugs.git diff --git a/scripts/service b/scripts/service index fe91144..c62e3d5 100755 --- a/scripts/service +++ b/scripts/service @@ -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} <= 5) { print {$transcript} "Too many unknown commands, stopping here.\n\n"; @@ -508,7 +508,7 @@ if (!defined $header{'subject'} || $header{'subject'} eq "") { } # Error text here advertises how many errors there were -my $error_text = $errors > 0 ? " (with $errors errors)":''; +my $error_text = $errors > 0 ? " (with $errors error" . ($errors > 1 ? "s" : "") . ")" : ""; my @common_headers; push @common_headers, 'X-Loop',$gMaintainerEmail; @@ -578,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, ); @@ -900,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() { $doc.=$_; } $!=0; close(L); if ($? == 255 && $doc =~ m/^\n*lynx: Can\'t access start file/) {