From: Don Armstrong Date: Tue, 26 Jun 2007 18:34:26 +0000 (+0100) Subject: * Pass usertags to get_bugs in pkgreport.cgi X-Git-Tag: release/2.6.0~532^2 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=0d773d8f9e51ed8923d0f8aaa511ddd9e9fdf2f1 * Pass usertags to get_bugs in pkgreport.cgi * Differentiate between usertags and bugusertags to avoid confusion --- diff --git a/Debbugs/Status.pm b/Debbugs/Status.pm index 6b6fabd..dac6d75 100644 --- a/Debbugs/Status.pm +++ b/Debbugs/Status.pm @@ -739,7 +739,7 @@ currently not correctly implemented. =item arch -- optional architecture(s) to check package status at -=item usertags -- optional hashref of usertags +=item bugusertags -- optional hashref of bugusertags =item sourceversion -- optional arrayref of source/version; overrides dist, arch, and version. [The entries in this array must be in the @@ -775,9 +775,9 @@ sub get_bug_status { arch => {type => SCALAR|ARRAYREF, optional => 1, }, - usertags => {type => HASHREF, - optional => 1, - }, + bugusertags => {type => HASHREF, + optional => 1, + }, sourceversions => {type => ARRAYREF, optional => 1, }, @@ -802,10 +802,10 @@ sub get_bug_status { } $status{id} = $param{bug}; - if (defined $param{usertags}{$param{bug}}) { + if (defined $param{bugusertags}{$param{bug}}) { $status{keywords} = "" unless defined $status{keywords}; $status{keywords} .= " " unless $status{keywords} eq ""; - $status{keywords} .= join(" ", @{$param{usertags}{$param{bug}}}); + $status{keywords} .= join(" ", @{$param{bugusertags}{$param{bug}}}); } $status{tags} = $status{keywords}; my %tags = map { $_ => 1 } split ' ', $status{tags}; diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index cffc324..f386655 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -326,8 +326,9 @@ if (defined $param{maint} and $param{maint} eq "") { } else { #yeah for magick! - @bugs = get_bugs(map {exists $param{$_}?($_,$param{$_}):()} - keys %search_keys, 'archive' + @bugs = get_bugs((map {exists $param{$_}?($_,$param{$_}):()} + keys %search_keys, 'archive'), + usertags => \%ut, ); } @@ -735,7 +736,7 @@ sub pkg_htmlizebugs { foreach my $bug (@bugs) { my %status = %{get_bug_status(bug=>$bug, (exists $param{dist}?(dist => $param{dist}):()), - usertags => \%bugusertags, + bugusertags => \%bugusertags, (exists $param{version}?(version => $param{version}):()), (exists $param{arch}?(arch => $param{arch}):()), )};