} else {
return;
}
- foreach (split(/&/,$in)) {
+ foreach (split(/[&;]/,$in)) {
s/\+/ /g;
($key, $val) = split(/=/,$_,2);
$key=~s/%(..)/pack("c",hex($1))/ge;
# exit 0;
#}
+# Split a package string from the status file into a list of package names.
+sub splitpackages {
+ my $pkgs = shift;
+ return unless defined $pkgs;
+ return split /[ \t?,()]+/, $pkgs;
+}
+
+# Generate a comma-separated list of HTML links to each package given in
+# $pkgs. $pkgs may be empty, in which case an empty string is returned, or
+# it may be a comma-separated list of package names.
+sub htmlpackagelinks {
+ my $pkgs = shift;
+ return unless defined $pkgs and $pkgs ne '';
+ my @pkglist = splitpackages($pkgs);
+
+ return 'Package' . (@pkglist > 1 ? 's' : '') . ': ' .
+ join(', ',
+ map {
+ '<a href="' . pkgurl($_) . '">' .
+ '<strong>' . htmlsanit($_) . '</strong></a>'
+ } @pkglist
+ ) . ";\n";
+}
+
sub htmlindexentry {
my $ref = shift;
my %status = %{getbugstatus($ref)};
$showseverity = "Severity: <em>$status{severity}</em>;\n";
}
- $result .= "Package: <a href=\"" . pkgurl($status{"package"}) . "\">"
- . "<strong>" . htmlsanit($status{"package"}) . "</strong></a>;\n"
- if (length($status{"package"}));
+ $result .= htmlpackagelinks($status{"package"});
$result .= $showseverity;
$result .= "Reported by: <a href=\"" . submitterurl($status{originator})
. "\">" . htmlsanit($status{originator}) . "</a>";
}
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";
$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";