From: cjwatson <> Date: Thu, 7 Aug 2003 06:35:55 +0000 (-0800) Subject: [project @ 2003-08-06 23:35:55 by cjwatson] X-Git-Tag: release/2.6.0~829 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=52220cb756169373733b83897f25bcfc3b326240;p=debbugs.git [project @ 2003-08-06 23:35:55 by cjwatson] Support indexon=tag for pkgindex.cgi. --- diff --git a/cgi/common.pl b/cgi/common.pl index 9986d2a..5886cf2 100644 --- a/cgi/common.pl +++ b/cgi/common.pl @@ -287,6 +287,14 @@ sub srcurl { return urlsanit("pkgreport.cgi" . "?" . "$params"); } +sub tagurl { + my $ref = shift; + my $params = "tag=$ref"; + $params .= "&archive=yes" if ($common_archive); + $params .= "&repeatmerged=no" unless ($common_repeatmerged); + return urlsanit("pkgreport.cgi" . "?" . "$params"); +} + sub urlsanit { my $url = shift; $url =~ s/%/%25/g; diff --git a/cgi/pkgindex.cgi b/cgi/pkgindex.cgi index a2c73e5..029ecd8 100755 --- a/cgi/pkgindex.cgi +++ b/cgi/pkgindex.cgi @@ -16,7 +16,7 @@ nice(5); my %param = readparse(); my $indexon = $param{'indexon'} || 'pkg'; -if ($indexon !~ m/^(pkg|src|maint|submitter)$/) { +if ($indexon !~ m/^(pkg|src|maint|submitter|tag)$/) { quitcgi("You have to choose something to index on"); } @@ -124,6 +124,16 @@ if ($indexon eq "pkg") { $note = "

Note that people may use different email accounts for\n"; $note .= "different bugs, so there may be other reports filed under\n"; $note .= "different addresses.

\n"; +} elsif ($indexon eq "tag") { + $tag = "tag"; + %count = countbugs(sub {my %d=@_; return split ' ', $d{tags}; }); + $note = ""; + foreach my $keyword (keys %count) { + $sortkey{$keyword} = lc $keyword; + $htmldescrip{$keyword} = sprintf('%s', + tagurl($keyword), + htmlsanit($keyword)); + } } my $result = "