]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2000-10-02 04:19:07 by ajt]
authorajt <>
Mon, 2 Oct 2000 11:19:07 +0000 (03:19 -0800)
committerajt <>
Mon, 2 Oct 2000 11:19:07 +0000 (03:19 -0800)
sani (from errorlib) -> htmlsanit (common.pl)
various other changes to avoid some perl warnings

cgi/bugreport.cgi
cgi/common.pl
cgi/pkgreport.cgi

index 6a699f962b5571ce9f82807558b946f84df6f5b9..3d06a11d5ee0a89b27a7dca9daa47dcae844b931 100755 (executable)
@@ -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: <A HREF=\"" . pkgurl($status{package}) . "\">"
            .htmlsanit($status{package})."</A>;\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 .= ";\n<strong>Done:</strong> ".&sani($status{done});
+       $indexentry .= ";\n<strong>Done:</strong> ".htmlsanit($status{done});
 } elsif (length($status{forwarded})) {
-       $indexentry .= ";\n<strong>Forwarded</strong> to ".&sani($status{forwarded});
+       $indexentry .= ";\n<strong>Forwarded</strong> 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".
-            '<A href="http://'.$debbugs::gWebDomain.'/db/ma/l'.&maintencoded($tmaint).'.html">'.&sani($tmaint).'</A>.';
+            '<A href="http://'.$debbugs::gWebDomain.'/db/ma/l'.&maintencoded($tmaint).'.html">'.htmlsanit($tmaint).'</A>.';
 
 my $buglog = buglog($ref);
 open L, "<$buglog" or &quit("open log for $ref: $!");
@@ -173,22 +173,22 @@ while(my $line = <L>) {
                $pl =~ s/\n+$//;
                m/^Received: \(at (\S+)\) by (\S+)\;/
                        || &quit("bad line \`$pl' in state incoming-recv");
-               $this = "<h2>Message received at ".&sani("$1\@$2")
+               $this = "<h2>Message received at ".htmlsanit("$1\@$2")
                        . ":</h2><br>\n<pre>\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 = "<h2>Message sent:</h2><br>\n";
                } else {
                        s/\04/, /g; s/\n$//;
-                       $this = "<h2>Message sent to ".&sani($_).":</h2><br>\n";
+                       $this = "<h2>Message sent to ".htmlsanit($_).":</h2><br>\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<br>\n"
-       . sani($status{subject}));
+       . htmlsanit($status{subject}));
 
 print "$descriptivehead\n";
 print hr;
index f3d45e527c6192136edb0410f2bc202265c55c74..fdf8e68f04560779ce4c0b4d1d5ddf71c41327da 100644 (file)
@@ -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 {
index 22a9c21287af474c042a6f4aac4f3d7d4955af5a..fa78845b1d1e7a9aba07ea6e99466186aac9d0b4 100755 (executable)
@@ -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 "<p>Maintainer for $pkg is <a href=\"" 
-          . mainturl($maintainer{$pkg}) . "\">"
-          . htmlsanit($maintainer{$pkg}) . "</a>.</p>\n";
-}
-
 if (defined $pkg) {
+    if (defined $maintainer{$pkg}) {
+        print "<p>Maintainer for $pkg is <a href=\"" 
+              . mainturl($maintainer{$pkg}) . "\">"
+              . htmlsanit($maintainer{$pkg}) . "</a>.</p>\n";
+    }
     print "<p>Note that with multi-binary packages there may be other\n";
     print "reports filed under the different binary package names.</p>\n";
 } elsif (defined $maint || defined $maintenc) {