my $maint = $maintainers->{$srcforpkg};
if (defined $maint) {
print {$output} '<p>';
- print {$output} htmlize_maintlinks(sub { $_[0] == 1 ? "Maintainer for $showpkg is "
- : "Maintainers for $showpkg are "
- },
- $maint);
+ print {$output} (($maint =~ /,/)? "Maintainer for $showpkg is "
+ : "Maintainers for $showpkg are ") .
+ package_links(maint => $maint);
print {$output} ".</p>\n";
}
else {
- print {$output} "<p>No maintainer for $showpkg. Please do not report new bugs against this package.</p>\n";
+ print {$output} "<p>There is no maintainer for $showpkg. ".
+ "Please do not report new bugs against this package.</p>\n";
}
my @pkgs = getsrcpkgs($srcforpkg);
@pkgs = grep( !/^\Q$package\E$/, @pkgs );
my @references;
my $pseudodesc = getpseudodesc();
if ($package and defined($pseudodesc) and exists($pseudodesc->{$package})) {
- push @references, "to the <a href=\"http://${debbugs::gWebDomain}/pseudo-packages${debbugs::gHTMLSuffix}\">".
+ push @references, "to the <a href=\"http://$config{web_domain}/pseudo-packages$config{html_suffix}\">".
"list of other pseudo-packages</a>";
}
+ elsif (not defined $maint and not @{$param{bugs}}) {
+ print {$output} "<p>There is no record of the " . html_escape($package) .
+ ($param{binary} ? " package" : " source package") .
+ ", and no bugs have been filed against it.</p>";
+ }
else {
- if ($package and defined $gPackagePages) {
+ if ($package and defined $config{package_pages} and length $config{package_pages}) {
push @references, sprintf "to the <a href=\"%s\">%s package page</a>",
- html_escape("http://${gPackagePages}/$package"), html_escape("$package");
+ html_escape("http://$config{package_pages}/$package"), html_escape("$package");
}
- if (defined $gSubscriptionDomain) {
+ if (defined $config{subscription_domain} and
+ length $config{subscription_domain}) {
my $ptslink = $param{binary} ? $srcforpkg : $package;
- push @references, q(to the <a href="http://).html_escape("$gSubscriptionDomain/$ptslink").q(">Package Tracking System</a>);
+ push @references, q(to the <a href="http://).html_escape("$config{subscription_domain}/$ptslink").q(">Package Tracking System</a>);
}
# Only output this if the source listing is non-trivial.
if ($param{binary} and $srcforpkg) {
$references[$#references] = "or $references[$#references]" if @references > 1;
print {$output} "<p>You might like to refer ", join(", ", @references), ".</p>\n";
}
- if (defined $param{maint} || defined $param{maintenc}) {
+ if (defined $maint) {
print {$output} "<p>If you find a bug not listed here, please\n";
printf {$output} "<a href=\"%s\">report it</a>.</p>\n",
- html_escape("http://${debbugs::gWebDomain}/Reporting${debbugs::gHTMLSuffix}");
- }
- if (not $maint and not @{$param{bugs}}) {
- print {$output} "<p>There is no record of the " . html_escape($package) .
- ($param{binary} ? " package" : " source package") .
- ", and no bugs have been filed against it.</p>";
+ html_escape("http://$config{web_domain}/Reporting$config{html_suffix}");
}
return $output_scalar;
}
push @{$status{blocks_array}}, {bug_num => $b, subject => $s{subject}, status => \%s};
}
}
-
-
+ my $days = bug_archiveable(bug => $status{id},
+ status => \%status,
+ days_until => 1,
+ );
+ $status{archive_days} = $days;
return fill_in_template(template => 'cgi/short_bug_status',
variables => {status => \%status,
isstrongseverity => \&Debbugs::Status::isstrongseverity,
'&version_url' => \&Debbugs::CGI::version_url,
'&secs_to_english' => \&Debbugs::Common::secs_to_english,
'&strftime' => \&POSIX::strftime,
+ '&maybelink' => \&Debbugs::CGI::maybelink,
},
);
-
- my $result = "";
-
- my $showseverity;
- if ($status{severity} eq 'normal') {
- $showseverity = '';
- }
- elsif (isstrongseverity($status{severity})) {
- $showseverity = "Severity: <em class=\"severity\">$status{severity}</em>;\n";
- }
- else {
- $showseverity = "Severity: <em>$status{severity}</em>;\n";
- }
-
- $result .= package_links(package => $status{package},
- options => $param{options},
- );
-
- my $showversions = '';
- if (@{$status{found_versions}}) {
- my @found = @{$status{found_versions}};
- $showversions .= join ', ', map {s{/}{ }; html_escape($_)} @found;
- }
- if (@{$status{fixed_versions}}) {
- $showversions .= '; ' if length $showversions;
- $showversions .= '<strong>fixed</strong>: ';
- my @fixed = @{$status{fixed_versions}};
- $showversions .= join ', ', map {s{/}{ }; html_escape($_)} @fixed;
- }
- $result .= ' (<a href="'.
- version_url(package => $status{package},
- found => $status{found_versions},
- fixed => $status{fixed_versions},
- ).qq{">$showversions</a>)} if length $showversions;
- $result .= ";\n";
-
- $result .= $showseverity;
- $result .= "Reported by: ".package_links(submitter=>$status{originator},
- class => "submitter",
- );
- $result .= ";\nOwned by: " . package_links(owner => $status{owner},
- class => "submitter",
- )
- if length $status{owner};
- $result .= ";\nTags: <strong>"
- . html_escape(join(", ", sort(split(/\s+/, $status{tags}))))
- . "</strong>"
- if (length($status{tags}));
-
- $result .= (length($status{mergedwith})?";\nMerged with ":"") .
- bug_links(bug => [split(/ /,$status{mergedwith})],
- class => "submitter",
- );
- $result .= (length($status{blockedby})?";\nBlocked by ":"") .
- bug_links(bug => [split(/ /,$status{blockedby})],
- class => "submitter",
- );
- $result .= (length($status{blocks})?";\nBlocks ":"") .
- bug_links(bug => [split(/ /,$status{blocks})],
- class => "submitter",
- );
-
- if (length($status{done})) {
- $result .= "<br><strong>Done:</strong> " . html_escape($status{done});
- my $days = bug_archiveable(bug => $status{id},
- status => \%status,
- days_until => 1,
- );
- if ($days >= 0 and defined $status{location} and $status{location} ne 'archive') {
- $result .= ";\n<strong>Can be archived" . ( $days == 0 ? " today" : $days == 1 ? " in $days day" : " in $days days" ) . "</strong>";
- }
- elsif (defined $status{location} and $status{location} eq 'archived') {
- $result .= ";\n<strong>Archived.</strong>";
- }
- }
-
- unless (length($status{done})) {
- if (length($status{forwarded})) {
- $result .= ";\n<strong>Forwarded</strong> to "
- . join(', ',
- map {maybelink($_)}
- split /\,\s+/,$status{forwarded}
- );
- }
- # Check the age of the logfile
- my ($days_last,$eng_last) = secs_to_english(time - $status{log_modified});
- my ($days,$eng) = secs_to_english(time - $status{date});
-
- if ($days >= 7) {
- my $font = "";
- my $efont = "";
- $font = "em" if ($days > 30);
- $font = "strong" if ($days > 60);
- $efont = "</$font>" if ($font);
- $font = "<$font>" if ($font);
-
- $result .= ";\n ${font}$eng old$efont";
- }
- if ($days_last > 7) {
- my $font = "";
- my $efont = "";
- $font = "em" if ($days_last > 30);
- $font = "strong" if ($days_last > 60);
- $efont = "</$font>" if ($font);
- $font = "<$font>" if ($font);
-
- $result .= ";\n ${font}Modified $eng_last ago$efont";
- }
- }
-
- $result .= ".";
-
- return $result;
}
options => {type => HASHREF,
default => {},
},
+ dist => {type => SCALAR,
+ optional => 1,
+ },
}
);
my @bugs = @{$param{bugs}};
my $header = '';
my $footer = "<h2 class=\"outstanding\">Summary</h2>\n";
- my @dummy = ($gRemoveAge); #, @gSeverityList, @gSeverityDisplay); #, $gHTMLExpireNote);
-
if (@bugs == 0) {
return "<HR><H2>No reports found!</H2></HR>\n";
}