code cleanup - remove unused find_values() copy and paste
authorGalen Charlton <galen.charlton@liblime.com>
Wed, 11 Jun 2008 21:38:14 +0000 (16:38 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 12 Jun 2008 16:17:29 +0000 (11:17 -0500)
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>
authorities/authorities.pl
authorities/detail.pl

index ef857fb..59acbb8 100755 (executable)
@@ -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
 
index 2ed7f27..7dc1978 100755 (executable)
@@ -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