Bugzilla – Attachment 72555 Details for
Bug 19940
Koha::Biblio - Remove GetBiblioItemInfosOf
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19940: Koha::Biblio - Remove GetBiblioItemInfosOf
Bug-19940-KohaBiblio---Remove-GetBiblioItemInfosOf.patch (text/plain), 2.70 KB, created by
Marcel de Rooy
on 2018-03-09 07:51:21 UTC
(
hide
)
Description:
Bug 19940: Koha::Biblio - Remove GetBiblioItemInfosOf
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-03-09 07:51:21 UTC
Size:
2.70 KB
patch
obsolete
>From 13c3045257d6822fdcce57142b6b25856932acaf Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 9 Jan 2018 13:58:53 -0300 >Subject: [PATCH] Bug 19940: Koha::Biblio - Remove GetBiblioItemInfosOf >Content-Type: text/plain; charset=utf-8 > >This subroutine is only used once and can be replaced easily with a >Koha::Biblioitems->search call > >Test plan: >Test this on top of bug 19941 and confirm that the correct item types >are displayed > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Biblio.pm | 23 ----------------------- > reserve/request.pl | 12 ++++++++++-- > 2 files changed, 10 insertions(+), 25 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index dac0656..800a48c 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -68,7 +68,6 @@ BEGIN { > GetBiblioData > GetMarcBiblio > GetBiblioItemData >- GetBiblioItemInfosOf > GetBiblioItemByBiblioNumber > > &GetRecordValue >@@ -909,28 +908,6 @@ sub GetISBDView { > return $res; > } > >-=head2 GetBiblioItemInfosOf >- >- GetBiblioItemInfosOf(@biblioitemnumbers); >- >-=cut >- >-sub GetBiblioItemInfosOf { >- my @biblioitemnumbers = @_; >- >- my $biblioitemnumber_values = @biblioitemnumbers ? join( ',', @biblioitemnumbers ) : "''"; >- >- my $dbh = C4::Context->dbh; >- my $query = " >- SELECT biblioitemnumber, >- publicationyear, >- itemtype >- FROM biblioitems >- WHERE biblioitemnumber IN ($biblioitemnumber_values) >- "; >- return $dbh->selectall_hashref($query, 'biblioitemnumber'); >-} >- > =head1 FUNCTIONS FOR HANDLING MARC MANAGEMENT > > =head2 IsMarcStructureInternal >diff --git a/reserve/request.pl b/reserve/request.pl >index d94a8ab..f92b2ab 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -316,8 +316,16 @@ foreach my $biblionumber (@biblionumbers) { > ## Should be same as biblionumber > my @biblioitemnumbers = keys %itemnumbers_of_biblioitem; > >- ## Hash of biblioitemnumber to 'biblioitem' table records >- my $biblioiteminfos_of = GetBiblioItemInfosOf(@biblioitemnumbers); >+ my $biblioiteminfos_of = { >+ map { >+ my $biblioitem = $_; >+ ( $biblioitem->{biblioitemnumber} => $biblioitem ) >+ } @{ Koha::Biblioitems->search( >+ { biblioitemnumber => { -in => \@biblioitemnumbers } }, >+ { select => ['biblioitemnumber', 'publicationyear', 'itemtype']} >+ )->unblessed >+ } >+ }; > > my $frameworkcode = GetFrameworkCode( $biblionumber ); > my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode }); >-- >2.1.4
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 19940
:
70381
|
72438
| 72555