From 903b0244529ead14061cb36a0f61ea8860ae4ac7 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 22 Jul 2021 09:24:52 +1200 Subject: [PATCH] Bug 27266: (QA follow-up) Rename to get_marc_authors Signed-off-by: Martin Renvoize Signed-off-by: David Nind Signed-off-by: Marcel de Rooy Signed-off-by: Fridolin Somers --- Koha/Biblio.pm | 6 +++--- basket/basket.pl | 2 +- basket/sendbasket.pl | 2 +- opac/opac-basket.pl | 2 +- opac/opac-detail.pl | 2 +- opac/opac-sendbasket.pl | 2 +- opac/opac-sendshelf.pl | 2 +- t/db_dependent/Koha/Biblio.t | 4 ++-- virtualshelves/sendshelf.pl | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index df741507f6..ef0e767a50 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -966,16 +966,16 @@ sub get_marc_notes { return \@marcnotes; } -=head3 get_authors_from_MARC +=head3 get_marc_authors - my $authors = $biblio->get_authors_from_MARC; + my $authors = $biblio->get_marc_authors; Get all authors from the MARC record and returns them in an array. The authors are stored in different fields depending on MARC flavour =cut -sub get_authors_from_MARC { +sub get_marc_authors { my ( $self, $params ) = @_; my ( $mintag, $maxtag, $fields_filter ); diff --git a/basket/basket.pl b/basket/basket.pl index a5169531cc..eace7fe03d 100755 --- a/basket/basket.pl +++ b/basket/basket.pl @@ -72,7 +72,7 @@ foreach my $biblionumber ( @bibs ) { my $biblio = Koha::Biblios->find( $biblionumber ); my $record = &GetMarcBiblio({ biblionumber => $biblionumber }); my $marcnotesarray = $biblio->get_marc_notes({ marcflavour => $marcflavour }); - my $marcauthorsarray = $biblio->get_authors_from_MARC; + my $marcauthorsarray = $biblio->get_marc_authors; my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my $marcseriesarray = GetMarcSeries ($record,$marcflavour); my $marcurlsarray = GetMarcUrls ($record,$marcflavour); diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl index 6110a601f0..a393add625 100755 --- a/basket/sendbasket.pl +++ b/basket/sendbasket.pl @@ -78,7 +78,7 @@ if ( $email_add ) { my $record = GetMarcBiblio({ biblionumber => $biblionumber, embed_items => 1 }); - my $marcauthorsarray = $biblio->get_authors_from_MARC; + my $marcauthorsarray = $biblio->get_marc_authors; my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my @items = GetItemsInfo( $biblionumber ); diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl index a3797132ba..fe50339a58 100755 --- a/opac/opac-basket.pl +++ b/opac/opac-basket.pl @@ -94,7 +94,7 @@ foreach my $biblionumber ( @bibs ) { $record_processor->process($record); next unless $record; my $marcnotesarray = $biblio->get_marc_notes({ marcflavour => $marcflavour, opac => 1 }); - my $marcauthorsarray = $biblio->get_authors_from_MARC; + my $marcauthorsarray = $biblio->get_marc_authors; my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my $marcseriesarray = GetMarcSeries ($record,$marcflavour); my $marcurlsarray = GetMarcUrls ($record,$marcflavour); diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 098ece2c68..83c2cc5389 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -784,7 +784,7 @@ if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) { } my $marcnotesarray = $biblio->get_marc_notes({ marcflavour => $marcflavour, opac => 1 }); -my $marcauthorsarray = $biblio->get_authors_from_MARC; +my $marcauthorsarray = $biblio->get_marc_authors; if( C4::Context->preference('ArticleRequests') ) { my $patron = $borrowernumber ? Koha::Patrons->find($borrowernumber) : undef; diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index cb43af3b28..ade073afc0 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -87,7 +87,7 @@ if ( $email_add ) { embed_items => 1, opac => 1, borcat => $borcat }); - my $marcauthorsarray = $biblio->get_authors_from_MARC; + my $marcauthorsarray = $biblio->get_marc_authors; my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my @items = GetItemsInfo( $biblionumber ); diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl index c8f9ed496a..bf593b711a 100755 --- a/opac/opac-sendshelf.pl +++ b/opac/opac-sendshelf.pl @@ -96,7 +96,7 @@ if ( $email ) { my $fw = GetFrameworkCode($biblionumber); my $dat = GetBiblioData($biblionumber); - my $marcauthorsarray = $biblio->get_authors_from_MARC; + my $marcauthorsarray = $biblio->get_marc_authors; my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my @items = GetItemsInfo( $biblionumber ); diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t index a666be265b..a2c0e52320 100755 --- a/t/db_dependent/Koha/Biblio.t +++ b/t/db_dependent/Koha/Biblio.t @@ -859,7 +859,7 @@ subtest 'current_checkouts() and old_checkouts() tests' => sub { $schema->storage->txn_rollback; }; -subtest 'get_authors_from_MARC() tests' => sub { +subtest 'get_marc_authors() tests' => sub { plan tests => 1; @@ -882,7 +882,7 @@ subtest 'get_authors_from_MARC() tests' => sub { C4::Biblio::ModBiblio( $record, $biblio->biblionumber ); $biblio = Koha::Biblios->find( $biblio->biblionumber ); - is( 4, @{$biblio->get_authors_from_MARC}, 'get_authors_from_MARC retrieves correct number of author subfields' ); + is( 4, @{$biblio->get_marc_authors}, 'get_marc_authors retrieves correct number of author subfields' ); $schema->storage->txn_rollback; }; diff --git a/virtualshelves/sendshelf.pl b/virtualshelves/sendshelf.pl index 58b4d144a2..dfd4be1dab 100755 --- a/virtualshelves/sendshelf.pl +++ b/virtualshelves/sendshelf.pl @@ -78,7 +78,7 @@ if ($to_address) { my $record = GetMarcBiblio({ biblionumber => $biblionumber, embed_items => 1 }); - my $marcauthorsarray = $biblio->get_authors_from_MARC; + my $marcauthorsarray = $biblio->get_marc_authors; my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my @items = GetItemsInfo($biblionumber); -- 2.39.5