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

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

Return to bug 17249