Lines 896-925
sub GetAuthValCode {
Link Here
|
896 |
return $authvalcode; |
896 |
return $authvalcode; |
897 |
} |
897 |
} |
898 |
|
898 |
|
899 |
=head2 GetAuthValCodeFromField |
|
|
900 |
|
901 |
$authvalcode = GetAuthValCodeFromField($field,$subfield,$frameworkcode); |
902 |
|
903 |
C<$subfield> can be undefined |
904 |
|
905 |
=cut |
906 |
|
907 |
sub GetAuthValCodeFromField { |
908 |
my ($field,$subfield,$fwcode) = @_; |
909 |
my $dbh = C4::Context->dbh; |
910 |
$fwcode='' unless $fwcode; |
911 |
my $sth; |
912 |
if (defined $subfield) { |
913 |
$sth = $dbh->prepare('select authorised_value from marc_subfield_structure where tagfield=? and tagsubfield=? and frameworkcode=?'); |
914 |
$sth->execute($field,$subfield,$fwcode); |
915 |
} else { |
916 |
$sth = $dbh->prepare('select authorised_value from marc_tag_structure where tagfield=? and frameworkcode=?'); |
917 |
$sth->execute($field,$fwcode); |
918 |
} |
919 |
my ($authvalcode) = $sth->fetchrow_array; |
920 |
return $authvalcode; |
921 |
} |
922 |
|
923 |
=head2 GetAuthorisedValues |
899 |
=head2 GetAuthorisedValues |
924 |
|
900 |
|
925 |
$authvalues = GetAuthorisedValues([$category]); |
901 |
$authvalues = GetAuthorisedValues([$category]); |
926 |
- |
|
|