[PATCH] If itemnumber is sent to catalogue/moredetail.pl use it
Michael Hafen
mdhafen at tech.washk12.org
Thu Aug 21 23:55:27 CEST 2008
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.
---
catalogue/moredetail.pl | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl
index 5d09087..9dea37a 100755
--- a/catalogue/moredetail.pl
+++ b/catalogue/moredetail.pl
@@ -51,6 +51,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({
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);
@@ -84,6 +85,10 @@ my $itemtypes = GetItemTypes;
$data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'};
$results[0]=$data;
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}};
--
1.5.4.3
--=-4Hr29yPRo66ynptL6ccg--
More information about the Koha-patches
mailing list