}
}
- return if $disposition eq 'attachment' and not defined($att);
+ return if not $top and $disposition eq 'attachment' and not defined($att);
return unless ($type =~ m[^text/?] and $type !~ m[^text/html(?:;|$)]) or
$type =~ m[^application/pgp(?:;|$)] or
$entity->parts;
push @descstates, $descmerged;
}
-if (length($status{done})) {
+if (@{$status{found_versions}}) {
+ my $foundtext = 'Found in ';
+ $foundtext .= (@{$status{found_versions}} == 1) ? 'version ' : 'versions ';
+ $foundtext .= join ', ', map htmlsanit($_), @{$status{found_versions}};
+ push @descstates, $foundtext;
+}
+
+if (@{$status{fixed_versions}}) {
+ my $fixedtext = '<strong>Fixed</strong> in ';
+ $fixedtext .= (@{$status{fixed_versions}} == 1) ? 'version ' : 'versions ';
+ $fixedtext .= join ', ', map htmlsanit($_), @{$status{fixed_versions}};
+ if (length($status{done})) {
+ $fixedtext .= ' by ' . htmlsanit($status{done});
+ }
+ push @descstates, $fixedtext;
+} elsif (length($status{done})) {
push @descstates, "<strong>Done:</strong> ".htmlsanit($status{done});
} elsif (length($status{forwarded})) {
push @descstates, "<strong>Forwarded</strong> to ".maybelink($status{forwarded});
my $tmaint = defined($maintainer{$pkg}) ? $maintainer{$pkg} : '(unknown)';
my $tsrc = defined($pkgsrc{$pkg}) ? $pkgsrc{$pkg} : '(unknown)';
- $descriptivehead .= "Maintainer for $pkg is\n".
- '<a href="'.mainturl($tmaint).'">'.htmlsanit($tmaint).'</a>';
+ $descriptivehead .=
+ htmlmaintlinks(sub { $_[0] == 1 ? "Maintainer for $pkg is\n"
+ : "Maintainers for $pkg are\n" },
+ $tmaint);
$descriptivehead .= ";\nSource for $pkg is\n".
'<a href="'.srcurl($tsrc)."\">$tsrc</a>" if ($tsrc ne "(unknown)");
$descriptivehead .= ".\n<br>";
}
open L, "<$buglog" or &quitcgi("open log for $ref: $!");
-if ($buglog !~ m#^\Q$gSpoolDir/db-h/#) {
+if ($buglog !~ m#^\Q$gSpoolDir/db#) {
$descriptivehead .= "\n<p>Bug is <strong>archived</strong>. No further changes may be made.</p>";
}
}
print "Content-Type: text/html\n\n";
+my $title = htmlsanit($status{subject});
+
print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
print "<HTML><HEAD>\n" .
- "<TITLE>$debbugs::gProject $debbugs::gBug report logs - $short</TITLE>\n" .
+ "<TITLE>$debbugs::gProject $debbugs::gBug report logs - $short - $title</TITLE>\n" .
"</HEAD>\n" .
'<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#800080">' .
"\n";
-print "<H1>" . "$debbugs::gProject $debbugs::gBug report logs - <A HREF=\"mailto:$ref\@$gEmailDomain\">$short</A>" .
- "<BR>" . htmlsanit($status{subject}) . "</H1>\n";
+print "<H1>" . "$debbugs::gProject $debbugs::gBug report logs - <A HREF=\"mailto:$ref\@$gEmailDomain\">$short</A>" .
+ "<BR>" . $title . "</H1>\n";
print "$descriptivehead\n";
printf "<p>View this report as an <a href=\"%s\">mbox folder</a>.</p>\n", mboxurl($ref);