From 04d8cfd65593eef42541a0510ae2d5b21b2ba962 Mon Sep 17 00:00:00 2001 From: Michael Hafen Date: Thu, 21 Aug 2008 15:55:27 -0600 Subject: [PATCH] If itemnumber is sent to catalogue/moredetail.pl use it If itemnumber is part of the url for catalogue/moredetail.pl put it to use. This happens in members/boraccount.pl if a fine is attached to a barcode. This patch makes moredetail.pl show only the item specified by itemnumber. Signed-off-by: Galen Charlton Signed-off-by: Chris Cormack --- catalogue/moredetail.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 6f626616f7..eeb5b29e2f 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -52,7 +52,6 @@ my $biblionumber=$query->param('biblionumber'); my $title=$query->param('title'); my $itemnumber=$query->param('itemnumber'); my $bi=$query->param('bi'); -# $bi = $biblionumber unless $bi; my $data=GetBiblioData($biblionumber); my $dewey = $data->{'dewey'}; @@ -85,6 +84,10 @@ $data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'}; $results[0]=$data; ($itemnumber) and @items = (grep {$_->{'itemnumber'} == $itemnumber} @items); foreach my $item (@items){ + if ( $itemnumber && $itemnumber != $item->{'itemnumber'} ) { + undef $item; + next; + } $item->{itemlostloop}= GetAuthorisedValues(GetAuthValCode('items.itemlost',$fw),$item->{itemlost}) if GetAuthValCode('items.itemlost',$fw); $item->{itemdamagedloop}= GetAuthorisedValues(GetAuthValCode('items.damaged',$fw),$item->{damaged}) if GetAuthValCode('items.damaged',$fw); $item->{'collection'} = $ccodes->{$item->{ccode}}; -- 2.39.5