X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FCGI.pm;h=b9554ea651a8e67bb3e6191afda643d9f9f14ea7;hb=0cd1eda7499d9dee79656a8240447b5e40537564;hp=b5c24ddbc648e7db0d133d1b1ecd83c4b7543eeb;hpb=2a2dd12fbe59631a5d4cdd6c1607b6181ead5782;p=debbugs.git diff --git a/Debbugs/CGI.pm b/Debbugs/CGI.pm index b5c24dd..b9554ea 100644 --- a/Debbugs/CGI.pm +++ b/Debbugs/CGI.pm @@ -394,10 +394,11 @@ sub package_links { } if ($has_options) { push @links, - munge_url('pkgreport.cgi?', + (munge_url('pkgreport.cgi?', %options, $t_type => $target, - ); + ), + $target); } else { push @links, ('pkgreport.cgi?'.$t_type.'='.uri_escape_utf8($target), @@ -469,23 +470,24 @@ returning htmlized links. =cut sub bug_links { + state $spec = {bug => {type => SCALAR|ARRAYREF, + optional => 1, + }, + links_only => {type => BOOLEAN, + default => 0, + }, + class => {type => SCALAR, + default => '', + }, + separator => {type => SCALAR, + default => ', ', + }, + options => {type => HASHREF, + default => {}, + }, + }; my %param = validate_with(params => \@_, - spec => {bug => {type => SCALAR|ARRAYREF, - optional => 1, - }, - links_only => {type => BOOLEAN, - default => 0, - }, - class => {type => SCALAR, - default => '', - }, - separator => {type => SCALAR, - default => ', ', - }, - options => {type => HASHREF, - default => {}, - }, - }, + spec => $spec, ); my %options = %{$param{options}}; @@ -502,7 +504,8 @@ sub bug_links { $_); } make_list($param{bug}) if exists $param{bug}; } else { - push @links, map {'bugreport.cgi?bug='.uri_escape_utf8($_)} + push @links, map {('bugreport.cgi?bug='.uri_escape_utf8($_), + $_)} make_list($param{bug}) if exists $param{bug}; } my @return;