Bugzilla – Attachment 107749 Details for
Bug 26133
Unneeded calls in detail.pl can be removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26133: Remove GetMarcHosts
Bug-26133-Remove-GetMarcHosts.patch (text/plain), 3.00 KB, created by
Jonathan Druart
on 2020-08-04 11:58:45 UTC
(
hide
)
Description:
Bug 26133: Remove GetMarcHosts
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-08-04 11:58:45 UTC
Size:
3.00 KB
patch
obsolete
>From 495b2e3053e7b28282ddc2b6c97faa2b491fe97c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 4 Aug 2020 13:55:13 +0200 >Subject: [PATCH] Bug 26133: Remove GetMarcHosts > >We removed the single occurrence of this subroutine in the previous >patch >--- > C4/Biblio.pm | 48 ------------------------------------------------ > t/Biblio.t | 8 +------- > 2 files changed, 1 insertion(+), 55 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index f62798db08..da86e62fdd 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -38,7 +38,6 @@ BEGIN { > GetMarcSubjects > GetMarcAuthors > GetMarcSeries >- GetMarcHosts > GetMarcUrls > GetUsedMarcStructure > GetXmlBiblio >@@ -1861,53 +1860,6 @@ sub GetMarcSeries { > return \@marcseries; > } #end getMARCseriess > >-=head2 GetMarcHosts >- >- $marchostsarray = GetMarcHosts($record,$marcflavour); >- >-Get all host records (773s MARC21, 461 UNIMARC) from the MARC record and returns them in an array. >- >-=cut >- >-sub GetMarcHosts { >- my ( $record, $marcflavour ) = @_; >- if (!$record) { >- carp 'GetMarcHosts called on undefined record'; >- return; >- } >- >- my ( $tag,$title_subf,$bibnumber_subf,$itemnumber_subf); >- $marcflavour ||="MARC21"; >- if ( $marcflavour eq "MARC21" || $marcflavour eq "NORMARC" ) { >- $tag = "773"; >- $title_subf = "t"; >- $bibnumber_subf ="0"; >- $itemnumber_subf='9'; >- } >- elsif ($marcflavour eq "UNIMARC") { >- $tag = "461"; >- $title_subf = "t"; >- $bibnumber_subf ="0"; >- $itemnumber_subf='9'; >- }; >- >- my @marchosts; >- >- foreach my $field ( $record->field($tag)) { >- >- my @fields_loop; >- >- my $hostbiblionumber = $field->subfield("$bibnumber_subf"); >- my $hosttitle = $field->subfield($title_subf); >- my $hostitemnumber=$field->subfield($itemnumber_subf); >- push @fields_loop, { hostbiblionumber => $hostbiblionumber, hosttitle => $hosttitle, hostitemnumber => $hostitemnumber}; >- push @marchosts, { MARCHOSTS_FIELDS_LOOP => \@fields_loop }; >- >- } >- my $marchostsarray = \@marchosts; >- return $marchostsarray; >-} >- > =head2 UpsertMarcSubfield > > my $record = C4::Biblio::UpsertMarcSubfield($MARC::Record, $fieldTag, $subfieldCode, $subfieldContent); >diff --git a/t/Biblio.t b/t/Biblio.t >index 0550ce7826..5596b4bf19 100755 >--- a/t/Biblio.t >+++ b/t/Biblio.t >@@ -21,7 +21,7 @@ use Test::More; > use Test::MockModule; > use Test::Warn; > >-plan tests => 43; >+plan tests => 41; > > use_ok('C4::Biblio'); > >@@ -117,12 +117,6 @@ warning_is { $ret = GetMarcSeries() } > > ok( !defined $ret, 'GetMarcSeries returns undef if not passed rec'); > >-warning_is { $ret = GetMarcHosts() } >- { carped => 'GetMarcHosts called on undefined record'}, >- "GetMarcHosts returns carped warning on undef record"; >- >-ok( !defined $ret, 'GetMarcHosts returns undef if not passed rec'); >- > my $hash_ref; > > warning_is { $hash_ref = TransformMarcToKoha( undef) } >-- >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 26133
:
107748
|
107749
|
107826
|
107827