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 <oleonard@myacpl.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2016-08-10 09:10:52 +01:00 committed by Mason James
parent 65945e30f7
commit 286b6f4e3e
1 changed files with 0 additions and 24 deletions

View File

@ -972,30 +972,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]);