From 654e9ebe72377fe04d47da8ced850151399c6ebf Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 21 Dec 2020 16:30:31 -0300 Subject: [PATCH] Bug 15448: (follow-up) Adapt to changes on bug 24254 Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart (cherry picked from commit 8af3ecdd538f22bfbf4d99bda629283fe856f3de) Signed-off-by: Fridolin Somers (cherry picked from commit 655c4427c7d2c9e4d05c016fa52833feb9c59892) Signed-off-by: Andrew Fuerste-Henry (cherry picked from commit 7f297d7f51486e3403197b53a5c0687d376000fb) Signed-off-by: Victor Grousset/tuxayo --- opac/opac-reserve.pl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 6ce75d0c7c..6b0e17bc46 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -72,11 +72,6 @@ for ( C4::Context->preference("OPACShowHoldQueueDetails") ) { my $patron = Koha::Patrons->find( $borrowernumber, { prefetch => ['categorycode'] } ); my $category = $patron->category; -# no OpacHiddenItems rules used if category is excepted -my $item_hide_rules = - ( $category->override_hidden_items ) - ? {} - : C4::Context->yaml_preference('OpacHiddenItems'); my $can_place_hold_if_available_at_pickup = C4::Context->preference('OPACHoldsIfAvailableAtPickup'); unless ( $can_place_hold_if_available_at_pickup ) { @@ -458,7 +453,7 @@ foreach my $biblioNum (@biblionumbers) { my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode }); my $notforloan_label_of = { map { $_->authorised_value => $_->opac_description } @notforloan_avs }; - my $visible_items = { map { $_->itemnumber => 1 } $biblio->items->filter_by_visible_in_opac( { rules => $item_hide_rules } ) }; + my $visible_items = { map { $_->itemnumber => 1 } $biblio->items->filter_by_visible_in_opac( { patron => $patron } ) }; # Only keep the items that are visible in the opac (i.e. those in %visible_items) # FIXME: We should get rid of itemInfos altogether and use $visible_items -- 2.39.5