Bugzilla – Attachment 127335 Details for
Bug 27266
Move C4::Biblio::GetMarcAuthors to Koha namespace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27266: (QA follow-up) Remove GetBiblioData from basket scripts
Bug-27266-QA-follow-up-Remove-GetBiblioData-from-b.patch (text/plain), 4.09 KB, created by
Marcel de Rooy
on 2021-11-05 08:28:17 UTC
(
hide
)
Description:
Bug 27266: (QA follow-up) Remove GetBiblioData from basket scripts
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-11-05 08:28:17 UTC
Size:
4.09 KB
patch
obsolete
>From a318d5105c29029758ffca114baf3b991a8c756b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 5 Nov 2021 07:34:45 +0000 >Subject: [PATCH] Bug 27266: (QA follow-up) Remove GetBiblioData from basket > scripts >Content-Type: text/plain; charset=utf-8 > >We are adding (or already doing) a Koha::Biblios->find, so we should >get rid of GetBiblioData, fetching the same data. >It returned a few extra columns, but unused here: > $dat->{bnotes}, $dat->{bi_notforloan} > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > basket/basket.pl | 6 ++---- > basket/sendbasket.pl | 6 ++---- > opac/opac-basket.pl | 6 ++---- > opac/opac-sendbasket.pl | 5 ++--- > 4 files changed, 8 insertions(+), 15 deletions(-) > >diff --git a/basket/basket.pl b/basket/basket.pl >index 84331cdf9b..80a30ecee5 100755 >--- a/basket/basket.pl >+++ b/basket/basket.pl >@@ -20,7 +20,6 @@ use Modern::Perl; > use CGI qw ( -utf8 ); > use C4::Koha; > use C4::Biblio qw( >- GetBiblioData > GetMarcBiblio > GetMarcSeries > GetMarcSubjects >@@ -66,9 +65,8 @@ if (C4::Context->preference('TagsEnabled')) { > foreach my $biblionumber ( @bibs ) { > $template->param( biblionumber => $biblionumber ); > >- my $dat = &GetBiblioData($biblionumber); >- next unless $dat; >- my $biblio = Koha::Biblios->find( $biblionumber ); >+ my $biblio = Koha::Biblios->find( $biblionumber ) or next; >+ my $dat = $biblio->unblessed; > my $record = &GetMarcBiblio({ biblionumber => $biblionumber }); > my $marcnotesarray = $biblio->get_marc_notes({ marcflavour => $marcflavour }); > my $marcauthorsarray = $biblio->get_marc_authors; >diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl >index c52c2cf69c..3c53605069 100755 >--- a/basket/sendbasket.pl >+++ b/basket/sendbasket.pl >@@ -23,7 +23,6 @@ use Carp qw( carp ); > use Try::Tiny qw( catch try ); > > use C4::Biblio qw( >- GetBiblioData > GetMarcBiblio > GetMarcSubjects > ); >@@ -71,9 +70,8 @@ if ( $email_add ) { > foreach my $biblionumber (@bibs) { > $template2->param( biblionumber => $biblionumber ); > >- my $dat = GetBiblioData($biblionumber); >- next unless $dat; >- my $biblio = Koha::Biblios->find( $biblionumber ); >+ my $biblio = Koha::Biblios->find( $biblionumber ) or next; >+ my $dat = $biblio->unblessed; > my $record = GetMarcBiblio({ > biblionumber => $biblionumber, > embed_items => 1 }); >diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl >index 013cbab083..ef137b95b0 100755 >--- a/opac/opac-basket.pl >+++ b/opac/opac-basket.pl >@@ -21,7 +21,6 @@ use CGI qw ( -utf8 ); > > use C4::Koha; > use C4::Biblio qw( >- GetBiblioData > GetFrameworkCode > GetMarcBiblio > GetMarcSeries >@@ -78,9 +77,8 @@ my $rules = C4::Context->yaml_preference('OpacHiddenItems'); > foreach my $biblionumber ( @bibs ) { > $template->param( biblionumber => $biblionumber ); > >- my $dat = &GetBiblioData($biblionumber); >- next unless $dat; >- my $biblio = Koha::Biblios->find( $biblionumber ); >+ my $biblio = Koha::Biblios->find( $biblionumber ) or next; >+ my $dat = $biblio->unblessed; > > # No filtering on the item records needed for the record itself > # since the only reason item information is grabbed is because of branchcodes. >diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl >index 14dd409667..a63a700d45 100755 >--- a/opac/opac-sendbasket.pl >+++ b/opac/opac-sendbasket.pl >@@ -78,9 +78,8 @@ if ( $email_add ) { > foreach my $biblionumber (@bibs) { > $template2->param( biblionumber => $biblionumber ); > >- my $dat = GetBiblioData($biblionumber); >- next unless $dat; >- my $biblio = Koha::Biblios->find( $biblionumber ); >+ my $biblio = Koha::Biblios->find( $biblionumber ) or next; >+ my $dat = $biblio->unblessed; > my $record = GetMarcBiblio({ > biblionumber => $biblionumber, > embed_items => 1, >-- >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 27266
:
114503
|
114580
|
117239
|
118311
|
118312
|
123017
|
123018
|
123019
|
123026
|
123027
|
123028
|
123067
|
125440
|
125441
|
125442
|
125443
|
125444
|
125465
|
125466
|
125467
|
125468
|
125469
|
125719
|
125720
|
125721
|
125722
|
125723
|
126539
|
126540
|
126541
|
126542
|
126543
|
127330
|
127331
|
127332
|
127333
|
127334
|
127335
|
127336
|
127337
|
127340
|
127341
|
127342
|
127561
|
127562
|
127563
|
127564
|
127565
|
127566
|
127567
|
127568