Browse Source

Bug 27266: (QA follow-up) Remove GetBiblioData from basket scripts

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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
master
Marcel de Rooy 3 months ago
committed by Fridolin Somers
parent
commit
441f57184d
  1. 6
      basket/basket.pl
  2. 6
      basket/sendbasket.pl
  3. 6
      opac/opac-basket.pl
  4. 6
      opac/opac-sendbasket.pl

6
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;

6
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 });

6
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.

6
opac/opac-sendbasket.pl

@ -25,7 +25,6 @@ use Carp qw( carp );
use Try::Tiny qw( catch try );
use C4::Biblio qw(
GetBiblioData
GetMarcBiblio
GetMarcSubjects
);
@ -78,9 +77,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,

Loading…
Cancel
Save