From 15506a7569145cf566aab28e1b7639be56058a26 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 10 Aug 2016 09:10:52 +0100 Subject: [PATCH] Bug 17249: GetKohaAuthorisedValuesFromField - rm GetAuthValCodeFromField The subroutine GetAuthValCodeFromField was only used from GetKohaAuthorisedValuesFromField. Test plan: git grep GetAuthValCodeFromField should not return any occurrences. Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall --- C4/Koha.pm | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index 073b74e1ea..a455039540 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -896,30 +896,6 @@ sub GetAuthValCode { return $authvalcode; } -=head2 GetAuthValCodeFromField - - $authvalcode = GetAuthValCodeFromField($field,$subfield,$frameworkcode); - -C<$subfield> can be undefined - -=cut - -sub GetAuthValCodeFromField { - my ($field,$subfield,$fwcode) = @_; - my $dbh = C4::Context->dbh; - $fwcode='' unless $fwcode; - my $sth; - if (defined $subfield) { - $sth = $dbh->prepare('select authorised_value from marc_subfield_structure where tagfield=? and tagsubfield=? and frameworkcode=?'); - $sth->execute($field,$subfield,$fwcode); - } else { - $sth = $dbh->prepare('select authorised_value from marc_tag_structure where tagfield=? and frameworkcode=?'); - $sth->execute($field,$fwcode); - } - my ($authvalcode) = $sth->fetchrow_array; - return $authvalcode; -} - =head2 GetAuthorisedValues $authvalues = GetAuthorisedValues([$category]); -- 2.39.5