Bugzilla – Attachment 54926 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]
Bug 17201: (bug 16431 follow-up) Remove occurrence of marcfromkohafield
Bug-17201-bug-16431-follow-up-Remove-occurrence-of.patch (text/plain), 1.48 KB, created by
Jonathan Druart
on 2016-08-26 13:30:18 UTC
(
hide
)
Description:
Bug 17201: (bug 16431 follow-up) Remove occurrence of marcfromkohafield
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-08-26 13:30:18 UTC
Size:
1.48 KB
patch
obsolete
>From d9b0433687dd721fb2240884d0b998ed9f948cf8 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] 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. >--- > 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.8.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 17201
:
54922
|
54923
|
54926
|
54927
|
54930
|
54931
|
54958
|
54959
|
54986