Lines 1199-1211
sub GetUsedMarcStructure {
Link Here
|
1199 |
($MARCfield,$MARCsubfield)=GetMarcFromKohaField($kohafield,$frameworkcode); |
1199 |
($MARCfield,$MARCsubfield)=GetMarcFromKohaField($kohafield,$frameworkcode); |
1200 |
|
1200 |
|
1201 |
Returns the MARC fields & subfields mapped to the koha field |
1201 |
Returns the MARC fields & subfields mapped to the koha field |
1202 |
for the given frameworkcode |
1202 |
for the given frameworkcode or default framework if $frameworkcode is missing |
1203 |
|
1203 |
|
1204 |
=cut |
1204 |
=cut |
1205 |
|
1205 |
|
1206 |
sub GetMarcFromKohaField { |
1206 |
sub GetMarcFromKohaField { |
1207 |
my ( $kohafield, $frameworkcode ) = @_; |
1207 |
my $kohafield = shift; |
1208 |
return (0, undef) unless $kohafield and defined $frameworkcode; |
1208 |
my $frameworkcode = shift || ''; |
|
|
1209 |
return (0, undef) unless $kohafield; |
1209 |
my $relations = C4::Context->marcfromkohafield; |
1210 |
my $relations = C4::Context->marcfromkohafield; |
1210 |
if ( my $mf = $relations->{$frameworkcode}->{$kohafield} ) { |
1211 |
if ( my $mf = $relations->{$frameworkcode}->{$kohafield} ) { |
1211 |
return @$mf; |
1212 |
return @$mf; |