Bugzilla – Attachment 114191 Details for
Bug 15448
Placing hold on specific items doesn't enforce OpacHiddenItems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15448: (QA follow-up) Move fetching the rules outside the loop
Bug-15448-QA-follow-up-Move-fetching-the-rules-out.patch (text/plain), 1.91 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-12-04 13:08:05 UTC
(
hide
)
Description:
Bug 15448: (QA follow-up) Move fetching the rules outside the loop
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-12-04 13:08:05 UTC
Size:
1.91 KB
patch
obsolete
>From 77c7e7100f1d3312f04ed0604a872b3ac10a863b Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 4 Dec 2020 10:06:22 -0300 >Subject: [PATCH] Bug 15448: (QA follow-up) Move fetching the rules outside the > loop > >--- > opac/opac-reserve.pl | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 41a5394eb86..42cb990372a 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -73,6 +73,11 @@ 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 ) >+ ? {} >+ : get_yaml_pref_hash('OpacHiddenItems'); > > my $can_place_hold_if_available_at_pickup = C4::Context->preference('OPACHoldsIfAvailableAtPickup'); > unless ( $can_place_hold_if_available_at_pickup ) { >@@ -463,13 +468,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 }; > >- # no OpacHiddenItems rules used if category is excepted >- my $rules = >- ( $category->override_hidden_items ) >- ? {} >- : get_yaml_pref_hash('OpacHiddenItems'); >- >- my $visible_items = { map { $_->itemnumber => 1 } $biblio->items->filter_by_visible_in_opac( { rules => $rules } ) }; >+ my $visible_items = { map { $_->itemnumber => 1 } $biblio->items->filter_by_visible_in_opac( { rules => $item_hide_rules } ) }; > > # 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.29.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15448
:
46100
|
113875
|
113876
|
114188
|
114189
|
114191
|
114193
|
114194
|
114208
|
114209
|
114263
|
114264
|
114578
|
115133
|
115134