Bug 36785: Do not pass biblionumber to get_approval_rows

Resolve:
[WARN] get_approval_rows received unreconized argument key 'biblionumber'. at /usr/share/koha/opac/opac-tags.pl line 336.

Test plan:
Visit opac-tags.pl?biblionumber=SOME_NUMBER
With this patch, you should no longer find a warning in the logs.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Marcel de Rooy 2024-05-06 09:04:26 +00:00 committed by Katrin Fischer
parent 8ea126b1f8
commit 5653c36d4a
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -332,11 +332,10 @@ if ($add_op) {
my $arghash = {approved=>1, limit=>$limit, 'sort'=>'-weight_total'};
$arghash->{'borrowernumber'} = $loggedinuser if $mine;
# ($openadds) or $arghash->{approved} = 1;
if ($arg = $query->param('tag')) {
$arghash->{term} = $arg;
} elsif ($arg = $query->param('biblionumber')) {
$arghash->{biblionumber} = $arg;
}
if ( $arg = $query->param('tag') ) {
$arghash->{term} = $arg;
}
# Bug 36785: Do not pass biblionumber: get_approval_rows does not 'recognize' biblionumber
$results = get_approval_rows($arghash);
stratify_tags(10, $results); # work out the differents sizes for things
my $count = scalar @$results;