X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=cgi%2Fpkgindex.cgi;h=855e3fb8599e1fa89b084ef9934b5da86f0b9015;hb=e8fcf4dfe70c1bc8a85b7cf928421ecb6afde5c6;hp=8adbfb86c18714eba413c515d1dd387b2acad717;hpb=a2280def4dae41ee886f5923ada6d4a2cf8d9461;p=debbugs.git diff --git a/cgi/pkgindex.cgi b/cgi/pkgindex.cgi index 8adbfb8..855e3fb 100755 --- a/cgi/pkgindex.cgi +++ b/cgi/pkgindex.cgi @@ -4,12 +4,14 @@ use warnings; use strict; use POSIX qw(strftime nice); -use Debbugs::Config; +use Debbugs::Config qw(:globals :text :config); use CGI::Simple; use Debbugs::CGI qw(:util :url :html); -use Debbugs::Common qw(getmaintainers); +use Debbugs::Common qw(getmaintainers getparsedaddrs); use Debbugs::Bugs qw(count_bugs); use Debbugs::Status qw(:status); +use Debbugs::Packages qw(getpkgsrc); +use Debbugs::Text qw(:templates); nice(5); @@ -57,9 +59,6 @@ my %maintainers = %{&getmaintainers()}; my %strings = (); my $dtime = strftime "%a, %e %b %Y %T UTC", gmtime; -my $tail_html = '';#$gHTMLTail; -$tail_html = '';#$gHTMLTail; -$tail_html =~ s/SUBSTITUTE_DTIME/$dtime/; my %count; my $tag; @@ -84,7 +83,7 @@ if ($indexon eq "pkg") { foreach my $pkg (keys %count) { $sortkey{$pkg} = lc $pkg; $htmldescrip{$pkg} = sprintf('%s (%s)', - pkg_url(pkg => $pkg), + package_links(package => $pkg, links_only=>1), html_escape($pkg), htmlize_maintlinks(sub { $_[0] == 1 ? 'maintainer: ' : 'maintainers: ' }, @@ -103,7 +102,7 @@ if ($indexon eq "pkg") { } } keys %count; } - %count = countbugs(function => sub {my %d=@_; + %count = count_bugs(function => sub {my %d=@_; return map { $pkgsrc->{$_} || $_ } splitpackages($d{"pkg"}); @@ -112,7 +111,7 @@ if ($indexon eq "pkg") { foreach my $src (keys %count) { $sortkey{$src} = lc $src; $htmldescrip{$src} = sprintf('%s (%s)', - srcurl($src), + package_links(src => $src, links_only=>1), html_escape($src), htmlize_maintlinks(sub { $_[0] == 1 ? 'maintainer: ' : 'maintainers: ' }, @@ -223,11 +222,12 @@ print "Content-Type: text/html\n\n"; print "\n"; print "\n" . - "$debbugs::gProject$Archived $debbugs::gBug reports by $tag\n" . + "$gProject$Archived $gBug reports by $tag\n" . + qq() . "\n" . '' . "\n"; -print "

" . "$debbugs::gProject$Archived $debbugs::gBug report logs by $tag" . +print "

" . "$gProject$Archived $gBug report logs by $tag" . "

\n"; print $note; @@ -256,6 +256,8 @@ else { print $result; print "
\n"; -print "

$tail_html"; - +print fill_in_template(template=>'html/html_tail', + hole_var => {'&strftime' => \&POSIX::strftime, + }, + ); print "\n";