From d914fb60dfb4ae95c34dc488c3c1805d23b5919e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Tue, 23 Jun 2009 14:01:14 +0200 Subject: [PATCH] Bug 3351 - Limit Serials Search for Biblio to an item type Signed-off-by: Galen Charlton --- serials/subscription-bib-search.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/serials/subscription-bib-search.pl b/serials/subscription-bib-search.pl index 21341dbf85..01c341db74 100755 --- a/serials/subscription-bib-search.pl +++ b/serials/subscription-bib-search.pl @@ -73,7 +73,10 @@ if ($op eq "do_search" && $query) { # add the itemtype limit if applicable my $itemtypelimit = $input->param('itemtypelimit'); - $query .= " AND itype=$itemtypelimit" if $itemtypelimit; + if ( $itemtypelimit ) { + my $index = C4::Context->preference("item-level_itypes") ? 'itype' : 'itemtype'; + $query .= " AND $index=$itemtypelimit"; + } $resultsperpage= $input->param('resultsperpage'); $resultsperpage = 19 if(!defined $resultsperpage); -- 2.39.5