Bugzilla – Attachment 54958 Details for
Bug 17201
Remaining calls to C4::Context->marcfromkohafield
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 17201: (bug 16431 follow-up) Remove occurrence of marcfromkohafield
PASSED-QA-Bug-17201-bug-16431-follow-up-Remove-occ.patch (text/plain), 1.61 KB, created by
Katrin Fischer
on 2016-08-28 19:34:41 UTC
(
hide
)
Description:
[PASSED QA] Bug 17201: (bug 16431 follow-up) Remove occurrence of marcfromkohafield
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-08-28 19:34:41 UTC
Size:
1.61 KB
patch
obsolete
>From ec2baae28277ed096668d31e8459bc691d9572f3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 26 Aug 2016 13:32:00 +0100 >Subject: [PATCH] [PASSED QA] Bug 17201: (bug 16431 follow-up) Remove > occurrence of marcfromkohafield > >I am not sure this code is called so I don't know how to test it. > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > Koha/MetadataRecord.pm | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/Koha/MetadataRecord.pm b/Koha/MetadataRecord.pm >index 1b2f4aa..9899e16 100644 >--- a/Koha/MetadataRecord.pm >+++ b/Koha/MetadataRecord.pm >@@ -35,6 +35,7 @@ and authority) records in Koha. > use Modern::Perl; > > use Carp; >+use C4::Biblio; > use Koha::Util::MARC; > > use base qw(Class::Accessor); >@@ -112,12 +113,13 @@ sub getKohaField { > my ($self, $kohafield) = @_; > > if ($self->schema =~ m/marc/) { >- my $relations = C4::Context->marcfromkohafield->{''}; >- my $tagfield = $relations->{$kohafield}; >+ my $frameworkcode = ""; # FIXME Why do we use the default framework? >+ my $mss = C4::Biblio::GetMarcSubfieldStructure( $frameworkcode ); >+ my $tagfield = $mss->{$kohafield}; > >- return '' if ref($tagfield) ne 'ARRAY'; >+ return '' if ref($tagfield) ne 'HASH'; > >- my ($tag, $subfield) = @$tagfield; >+ my ($tag, $subfield) = ( $tagfield->{tagfield}, $tagfield->{tagsubfield} ); > my @kohafield; > foreach my $field ( $self->record->field($tag) ) { > if ( $field->tag() < 10 ) { >-- >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 17201
:
54922
|
54923
|
54926
|
54927
|
54930
|
54931
| 54958 |
54959
|
54986