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:
parent
65945e30f7
commit
286b6f4e3e
24
C4/Koha.pm
24
C4/Koha.pm
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue