]> git.donarmstrong.com Git - debbugs.git/blobdiff - cgi/common.pl
[project @ 2002-12-08 13:50:29 by cjwatson]
[debbugs.git] / cgi / common.pl
index 1d42b72058ebef83ede5f5290adc0452b4c6aeb0..d45b9debc80d45801771551e6dc5bfe72867c4ae 100644 (file)
@@ -70,7 +70,7 @@ sub readparse {
     } else {
         return;
     }
-    foreach (split(/&/,$in)) {
+    foreach (split(/[&;]/,$in)) {
         s/\+/ /g;
         ($key, $val) = split(/=/,$_,2);
         $key=~s/%(..)/pack("c",hex($1))/ge;
@@ -322,7 +322,13 @@ sub htmlizebugs {
             }
            next unless ($okay);
        }
-           
+       next if @common_pending_include and
+            not grep { $_ eq $status{pending} } @common_pending_include;
+       next if @common_severity_include and
+            not grep { $_ eq $status{severity} } @common_severity_include;
+       next if grep { $_ eq $status{pending} } @common_pending_exclude;
+       next if grep { $_ eq $status{severity} } @common_severity_exclude;
+
        my $html = sprintf "<li><a href=\"%s\">#%d: %s</a>\n<br>",
            bugurl($bug), $bug, htmlsanit($status{subject});
        $html .= htmlindexentrystatus(\%status) . "\n";
@@ -336,20 +342,16 @@ sub htmlizebugs {
        $result .= "<UL>\n" . join("", @rawsort ) . "</UL>\n";
     } else {
        my @pendingList = qw(pending forwarded pending-fixed fixed done);
-       @pendingList = @common_pending_include if @common_pending_include;
        @pendingList = reverse @pendingList if $common_pending_reverse;
 #print STDERR join(",",@pendingList)."\n";
 #print STDERR join(",",@common_pending_include).":$#common_pending_include\n";
     foreach my $pending (@pendingList) {
-       next if grep( /^$pending$/, @common_pending_exclude);
        my @severityList = @debbugs::gSeverityList;
-       @severityList = @common_severity_include if @common_severity_include;
        @severityList = reverse @severityList if $common_severity_reverse;
 #print STDERR join(",",@severityList)."\n";
 
 #        foreach my $severity(@debbugs::gSeverityList) {
         foreach my $severity(@severityList) {
-           next if grep( /^$severity$/, @common_severity_exclude);
             $severity = $debbugs::gDefaultSeverity if ($severity eq '');
             next unless defined $section{${pending} . "_" . ${severity}};
             $result .= "<HR><H2>$debbugs::gSeverityDisplay{$severity} - $displayshowpending{$pending}</H2>\n";
@@ -509,6 +511,21 @@ sub getpkgcomponent {
     return $_pkgcomponent;
 }
 
+my $_pseudodesc;
+sub getpseudodesc {
+    return $_pseudodesc if $_pseudodesc;
+    my %pseudodesc;
+
+    open(PSEUDO, "< $gPseudoDescFile") or &quit("open $gPseudoDescFile: $!");
+    while(<PSEUDO>) {
+       next unless m/^(\S+)\s+(\S.*\S)\s*$/;
+       $pseudodesc{lc $1} = $2;
+    }
+    close(PSEUDO);
+    $_pseudodesc = \%pseudodesc;
+    return $_pseudodesc;
+}
+
 sub getbugdir {
     my ( $bugnum, $ext ) = @_;
     my $archdir = sprintf "%02d", $bugnum % 100;
@@ -541,8 +558,8 @@ sub getbugstatus {
 
     $status{"pending"} = 'pending';
     $status{"pending"} = 'forwarded'       if (length($status{"forwarded"}));
-    $status{"pending"} = 'fixed'           if ($status{"tags"} =~ /\bfixed\b/);
     $status{"pending"} = 'pending-fixed'    if ($status{"tags"} =~ /\bpending\b/);
+    $status{"pending"} = 'fixed'           if ($status{"tags"} =~ /\bfixed\b/);
     $status{"pending"} = 'done'                    if (length($status{"done"}));
 
     return \%status;