Lines 2876-2920
sub _AddBiblioNoZebra {
Link Here
|
2876 |
return %result; |
2876 |
return %result; |
2877 |
} |
2877 |
} |
2878 |
|
2878 |
|
2879 |
=head2 _find_value |
|
|
2880 |
|
2881 |
($indicators, $value) = _find_value($tag, $subfield, $record,$encoding); |
2882 |
|
2883 |
Find the given $subfield in the given $tag in the given |
2884 |
MARC::Record $record. If the subfield is found, returns |
2885 |
the (indicators, value) pair; otherwise, (undef, undef) is |
2886 |
returned. |
2887 |
|
2888 |
PROPOSITION : |
2889 |
Such a function is used in addbiblio AND additem and serial-edit and maybe could be used in Authorities. |
2890 |
I suggest we export it from this module. |
2891 |
|
2892 |
=cut |
2893 |
|
2894 |
sub _find_value { |
2895 |
my ( $tagfield, $insubfield, $record, $encoding ) = @_; |
2896 |
my @result; |
2897 |
my $indicator; |
2898 |
if ( $tagfield < 10 ) { |
2899 |
if ( $record->field($tagfield) ) { |
2900 |
push @result, $record->field($tagfield)->data(); |
2901 |
} else { |
2902 |
push @result, ""; |
2903 |
} |
2904 |
} else { |
2905 |
foreach my $field ( $record->field($tagfield) ) { |
2906 |
my @subfields = $field->subfields(); |
2907 |
foreach my $subfield (@subfields) { |
2908 |
if ( @$subfield[0] eq $insubfield ) { |
2909 |
push @result, @$subfield[1]; |
2910 |
$indicator = $field->indicator(1) . $field->indicator(2); |
2911 |
} |
2912 |
} |
2913 |
} |
2914 |
} |
2915 |
return ( $indicator, @result ); |
2916 |
} |
2917 |
|
2918 |
=head2 _koha_marc_update_bib_ids |
2879 |
=head2 _koha_marc_update_bib_ids |
2919 |
|
2880 |
|
2920 |
|
2881 |
|