View | Details | Raw Unified | Return to bug 17249
Collapse All | Expand All

(-)a/C4/Koha.pm (-25 lines)
Lines 970-999 sub GetAuthValCode { Link Here
970
	return $authvalcode;
970
	return $authvalcode;
971
}
971
}
972
972
973
=head2 GetAuthValCodeFromField
974
975
  $authvalcode = GetAuthValCodeFromField($field,$subfield,$frameworkcode);
976
977
C<$subfield> can be undefined
978
979
=cut
980
981
sub GetAuthValCodeFromField {
982
	my ($field,$subfield,$fwcode) = @_;
983
	my $dbh = C4::Context->dbh;
984
	$fwcode='' unless $fwcode;
985
	my $sth;
986
	if (defined $subfield) {
987
	    $sth = $dbh->prepare('select authorised_value from marc_subfield_structure where tagfield=? and tagsubfield=? and frameworkcode=?');
988
	    $sth->execute($field,$subfield,$fwcode);
989
	} else {
990
	    $sth = $dbh->prepare('select authorised_value from marc_tag_structure where tagfield=? and frameworkcode=?');
991
	    $sth->execute($field,$fwcode);
992
	}
993
	my ($authvalcode) = $sth->fetchrow_array;
994
	return $authvalcode;
995
}
996
997
=head2 GetAuthorisedValues
973
=head2 GetAuthorisedValues
998
974
999
  $authvalues = GetAuthorisedValues([$category]);
975
  $authvalues = GetAuthorisedValues([$category]);
1000
- 

Return to bug 17249