code cleanup - remove unused find_values() copy and paste
The find_values() function in authorities/authorities.pl and authorities/detail.pl is not used; appears to be copied from additem.pl. No documentation changes. Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
0f2eb979cb
commit
b74f8cfab7
2 changed files with 0 additions and 70 deletions
|
@ -35,41 +35,6 @@ use vars qw( $is_a_modif );
|
|||
|
||||
my $itemtype; # created here because it can be used in build_authorized_values_list sub
|
||||
our($authorised_values_sth,$is_a_modif,$usedTagsLib,$mandatory_z3950);
|
||||
=item find_value
|
||||
|
||||
($indicators, $value) = find_value($tag, $subfield, $record,$encoding);
|
||||
|
||||
Find the given $subfield in the given $tag in the given
|
||||
MARC::Record $record. If the subfield is found, returns
|
||||
the (indicators, value) pair; otherwise, (undef, undef) is
|
||||
returned.
|
||||
|
||||
=cut
|
||||
|
||||
sub find_value {
|
||||
my ($tagfield,$insubfield,$record,$encoding) = @_;
|
||||
my @result;
|
||||
my $indicator;
|
||||
if ($tagfield <10) {
|
||||
if ($record->field($tagfield)) {
|
||||
push @result, $record->field($tagfield)->data();
|
||||
} else {
|
||||
push @result,"";
|
||||
}
|
||||
} else {
|
||||
foreach my $field ($record->field($tagfield)) {
|
||||
my @subfields = $field->subfields();
|
||||
foreach my $subfield (@subfields) {
|
||||
if (@$subfield[0] eq $insubfield) {
|
||||
push @result,@$subfield[1];
|
||||
$indicator = $field->indicator(1).$field->indicator(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return($indicator,@result);
|
||||
}
|
||||
|
||||
|
||||
=item build_authorized_values_list
|
||||
|
||||
|
|
|
@ -51,41 +51,6 @@ use C4::Koha;
|
|||
# use C4::Catalogue;
|
||||
|
||||
our ($tagslib);
|
||||
=item find_value
|
||||
|
||||
($indicators, $value) = find_value($tag, $subfield, $record,$encoding);
|
||||
|
||||
Find the given $subfield in the given $tag in the given
|
||||
MARC::Record $record. If the subfield is found, returns
|
||||
the (indicators, value) pair; otherwise, (undef, undef) is
|
||||
returned.
|
||||
|
||||
=cut
|
||||
|
||||
sub find_value {
|
||||
my ($tagfield,$insubfield,$record,$encoding) = @_;
|
||||
my @result;
|
||||
my $indicator;
|
||||
if ($tagfield <10) {
|
||||
if ($record->field($tagfield)) {
|
||||
push @result, $record->field($tagfield)->data();
|
||||
} else {
|
||||
push @result,"";
|
||||
}
|
||||
} else {
|
||||
foreach my $field ($record->field($tagfield)) {
|
||||
my @subfields = $field->subfields();
|
||||
foreach my $subfield (@subfields) {
|
||||
if (@$subfield[0] eq $insubfield) {
|
||||
push @result,@$subfield[1];
|
||||
$indicator = $field->indicator(1).$field->indicator(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return($indicator,@result);
|
||||
}
|
||||
|
||||
|
||||
=item build_authorized_values_list
|
||||
|
||||
|
|
Loading…
Reference in a new issue