From c913a3482bcca547d371931261a8831f2cd4ecaf Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 10 Aug 2016 12:10:46 +0100 Subject: [PATCH] Bug 17249: Remove GetKohaAuthorisedValuesFromField Remove the subroutine, it's no longer in used. Test plan: git grep GetKohaAuthorisedValuesFromField should not return any occurrences. Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall --- C4/Koha.pm | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index 70849d60c3..073b74e1ea 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -54,7 +54,6 @@ BEGIN { &GetAuthorisedValues &GetAuthorisedValueCategories &GetKohaAuthorisedValues - &GetKohaAuthorisedValuesFromField &GetKohaAuthorisedValuesMapping &GetAuthorisedValueByCode &GetAuthValCode @@ -1059,37 +1058,6 @@ sub GetKohaAuthorisedValues { } } -=head2 GetKohaAuthorisedValuesFromField - -Takes $field, $subfield, $fwcode as parameters. - -If $opac parameter is set to a true value, displays OPAC descriptions rather than normal ones when they exist. -$subfield can be undefined - -Returns hashref of Code => description - -Returns undef if no authorised value category is defined for the given field and subfield - -=cut - -sub GetKohaAuthorisedValuesFromField { - my ($field, $subfield, $fwcode,$opac) = @_; - $fwcode='' unless $fwcode; - my %values; - my $dbh = C4::Context->dbh; - my $avcode = GetAuthValCodeFromField($field, $subfield, $fwcode); - if ($avcode) { - my $sth = $dbh->prepare("select authorised_value, lib, lib_opac from authorised_values where category=? "); - $sth->execute($avcode); - while ( my ($val, $lib, $lib_opac) = $sth->fetchrow_array ) { - $values{$val} = ($opac && $lib_opac) ? $lib_opac : $lib; - } - return \%values; - } else { - return; - } -} - =head2 GetKohaAuthorisedValuesMapping Takes a hash as a parameter. The interface key indicates the -- 2.39.5