Bug 28765: Remove sub find_value from batchMod.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 26 Jul 2021 16:31:43 +0000 (18:31 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 16 Aug 2021 09:55:55 +0000 (11:55 +0200)
It has never been used and should be removed

Test plan:
Search for "find_value" in the file and confirm that there is no more
occurrence

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
tools/batchMod.pl

index 4f0efe8..0f57a2d 100755 (executable)
@@ -757,19 +757,3 @@ sub UpdateMarcWith {
     }
     return $modified;
 }
-
-sub find_value {
-    my ($tagfield,$insubfield,$record) = @_;
-    my $result;
-    my $indicator;
-    foreach my $field ($record->field($tagfield)) {
-        my @subfields = $field->subfields();
-        foreach my $subfield (@subfields) {
-            if (@$subfield[0] eq $insubfield) {
-                $result .= @$subfield[1];
-                $indicator = $field->indicator(1).$field->indicator(2);
-            }
-        }
-    }
-    return($indicator,$result);
-}