Bugzilla – Attachment 115132 Details for
Bug 24254
Add Koha::Items->filter_by_visible_in_opac
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24254: Remove items fetch
Bug-24254-Remove-items-fetch.patch (text/plain), 1.60 KB, created by
Jonathan Druart
on 2021-01-14 09:45:26 UTC
(
hide
)
Description:
Bug 24254: Remove items fetch
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-01-14 09:45:26 UTC
Size:
1.60 KB
patch
obsolete
>From 838194689cf6b969bba736a0a0f9c87343b8524c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 14 Jan 2021 10:44:46 +0100 >Subject: [PATCH] Bug 24254: Remove items fetch > >We fetch them already too many times. >--- > opac/opac-reserve.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index d6e6745c6b..b90a2061b2 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -462,7 +462,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( { patron => $patron } )->as_list }; >+ my $visible_items = { map { $_->itemnumber => $_ } $biblio->items->filter_by_visible_in_opac( { patron => $patron } )->as_list }; > > # 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 >@@ -473,7 +473,7 @@ foreach my $biblioNum (@biblionumbers) { > my $numCopiesOPACAvailable = 0; > foreach my $itemInfo (@{$biblioData->{itemInfos}}) { > my $itemNum = $itemInfo->{itemnumber}; >- my $item = Koha::Items->find( $itemNum ); >+ my $item = $visible_items->{$itemNum}; > my $itemLoopIter = {}; > > $itemLoopIter->{itemnumber} = $itemNum; >-- >2.20.1
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 24254
:
96373
|
114159
|
114160
|
114206
|
114207
|
114278
|
114279
|
114539
|
114540
|
114548
|
114549
|
114550
|
114551
|
114574
|
114594
|
114595
|
114596
|
114597
|
114598
|
114599
|
114664
|
114665
|
114666
|
114667
|
114668
|
115131
|
115132
|
115147
|
115148
|
115149
|
115150
|
115151
|
115152
|
115153
|
116070
|
116071
|
116072
|
116073
|
116074
|
116075