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:
Galen Charlton 2008-06-11 16:38:14 -05:00 committed by Joshua Ferraro
parent 0f2eb979cb
commit b74f8cfab7
2 changed files with 0 additions and 70 deletions

View file

@ -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

View file

@ -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