From: ajt <> Date: Mon, 2 Oct 2000 11:19:07 +0000 (-0800) Subject: [project @ 2000-10-02 04:19:07 by ajt] X-Git-Tag: release/2.6.0~1263 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f0904eeb31097c19ec30e9a516bf50392f93a987;p=debbugs.git [project @ 2000-10-02 04:19:07 by ajt] sani (from errorlib) -> htmlsanit (common.pl) various other changes to avoid some perl warnings --- diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 6a699f96..3d06a11d 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -5,7 +5,7 @@ package debbugs; use strict; use CGI qw/:standard/; -require '/usr/lib/debbugs/errorlib'; +#require '/usr/lib/debbugs/errorlib'; #require '/usr/lib/debbugs/common.pl'; require '/debian/home/ajt/newajbug/common.pl'; @@ -59,8 +59,8 @@ $indexentry .= $showseverity; $indexentry .= "Package: " .htmlsanit($status{package}).";\n"; -$indexentry .= ";Reported by: ".&sani($status{originator}); -$indexentry .= ";\nKeywords: ".&sani($status{keywords}) +$indexentry .= ";Reported by: ".htmlsanit($status{originator}); +$indexentry .= ";\nKeywords: ".htmlsanit($status{keywords}) if length($status{keywords}); my @merged= split(/ /,$status{mergedwith}); @@ -79,16 +79,16 @@ chomp($dummy); $submitted = ";\ndated ".$dummy; if (length($status{done})) { - $indexentry .= ";\nDone: ".&sani($status{done}); + $indexentry .= ";\nDone: ".htmlsanit($status{done}); } elsif (length($status{forwarded})) { - $indexentry .= ";\nForwarded to ".&sani($status{forwarded}); + $indexentry .= ";\nForwarded to ".htmlsanit($status{forwarded}); } my ($short, $tmaint); $short = $ref; $short =~ s/^\d+/#$&/; $tmaint = defined($maintainer{$tpack}) ? $maintainer{$tpack} : '(unknown)'; $descriptivehead= $indexentry.$submitted.";\nMaintainer for $status{package} is\n". - ''.&sani($tmaint).'.'; + ''.htmlsanit($tmaint).'.'; my $buglog = buglog($ref); open L, "<$buglog" or &quit("open log for $ref: $!"); @@ -173,22 +173,22 @@ while(my $line = ) { $pl =~ s/\n+$//; m/^Received: \(at (\S+)\) by (\S+)\;/ || &quit("bad line \`$pl' in state incoming-recv"); - $this = "

Message received at ".&sani("$1\@$2") + $this = "

Message received at ".htmlsanit("$1\@$2") . ":


\n
\n$_";
 		$normstate= 'go';
 	} elsif ($normstate eq 'html') {
 		$this .= $_;
 	} elsif ($normstate eq 'go') {
-		$this .= &sani($_);
+		$this .= htmlsanit($_);
 	} elsif ($normstate eq 'go-nox') {
 		next if !s/^X//;
-		$this .= &sani($_);
+		$this .= htmlsanit($_);
         } elsif ($normstate eq 'recips') {
 		if (m/^-t$/) {
 			$this = "

Message sent:


\n"; } else { s/\04/, /g; s/\n$//; - $this = "

Message sent to ".&sani($_).":


\n"; + $this = "

Message sent to ".htmlsanit($_).":


\n"; } $normstate= 'kill-body'; } elsif ($normstate eq 'autocheck') { @@ -215,7 +215,7 @@ print start_html( -title => "$debbugs::gProject $debbugs::gBug report logs - $short"); print h1("$debbugs::gProject $debbugs::gBug report logs - $short
\n" - . sani($status{subject})); + . htmlsanit($status{subject})); print "$descriptivehead\n"; print hr; diff --git a/cgi/common.pl b/cgi/common.pl index f3d45e52..fdf8e68f 100644 --- a/cgi/common.pl +++ b/cgi/common.pl @@ -213,7 +213,7 @@ sub maintbugs { my %maintainers = getmaintainers(); my $chk = sub { my %d = @_; - ($maintemail = $maintainers{$d{"pkg"}}) =~ s/\s*\(.*\)\s*//; + ($maintemail = $maintainers{$d{"pkg"}} || "") =~ s/\s*\(.*\)\s*//; if ($maintemail =~ m/<(.*)>/) { $maintemail = $1 } return $maintemail eq $maint; }; @@ -223,7 +223,7 @@ sub maintbugs { sub maintencbugs { my $maint = shift; my %maintainers = getmaintainers(); - return getbugs(sub {my %d=@_; return maintencoded($maintainers{$d{"pkg"}}) eq $maint}); + return getbugs(sub {my %d=@_; return maintencoded($maintainers{$d{"pkg"}} || "") eq $maint}); } sub pkgbugs { diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index 22a9c212..fa78845b 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -7,7 +7,7 @@ use CGI qw/:standard/; require '/debian/home/ajt/newajbug/common.pl'; #require '/usr/lib/debbugs/common.pl'; -require '/usr/lib/debbugs/errorlib'; +#require '/usr/lib/debbugs/errorlib'; require '/etc/debbugs/config'; require '/etc/debbugs/text'; @@ -32,6 +32,7 @@ my %strings = (); my $dtime=`date -u '+%H:%M:%S GMT %a %d %h'`; chomp($dtime); my $tail_html = $debbugs::gHTMLTail; +$tail_html = $debbugs::gHTMLTail; $tail_html =~ s/SUBSTITUTE_DTIME/$dtime/; my $tag; @@ -71,13 +72,12 @@ print start_html( print h1("$debbugs::gProject $Archived $debbugs::gBug report logs: $tag"); -if (defined $maintainer{$pkg}) { - print "

Maintainer for $pkg is " - . htmlsanit($maintainer{$pkg}) . ".

\n"; -} - if (defined $pkg) { + if (defined $maintainer{$pkg}) { + print "

Maintainer for $pkg is " + . htmlsanit($maintainer{$pkg}) . ".

\n"; + } print "

Note that with multi-binary packages there may be other\n"; print "reports filed under the different binary package names.

\n"; } elsif (defined $maint || defined $maintenc) {