|
Lines 21-33
use Modern::Perl;
Link Here
|
| 21 |
use Template::Plugin; |
21 |
use Template::Plugin; |
| 22 |
use base qw( Template::Plugin ); |
22 |
use base qw( Template::Plugin ); |
| 23 |
|
23 |
|
| 24 |
use Encode qw{encode is_utf8}; |
|
|
| 25 |
|
| 26 |
use C4::Koha; |
24 |
use C4::Koha; |
| 27 |
|
25 |
|
| 28 |
sub GetByCode { |
26 |
sub GetByCode { |
| 29 |
my ( $self, $category, $code, $opac ) = @_; |
27 |
my ( $self, $category, $code, $opac ) = @_; |
| 30 |
return encode( 'UTF-8', GetAuthorisedValueByCode( $category, $code, $opac ) ); |
28 |
return GetAuthorisedValueByCode( $category, $code, $opac ); |
| 31 |
} |
29 |
} |
| 32 |
|
30 |
|
| 33 |
sub Get { |
31 |
sub Get { |
|
Lines 65-72
The parameters are identical to those used by the subroutine C4::Koha::GetAuthor
Link Here
|
| 65 |
|
63 |
|
| 66 |
sub GetByCode { |
64 |
sub GetByCode { |
| 67 |
my ( $self, $category, $code, $opac ) = @_; |
65 |
my ( $self, $category, $code, $opac ) = @_; |
| 68 |
my $av = GetAuthorisedValueByCode( $category, $code, $opac ); |
66 |
return GetAuthorisedValueByCode( $category, $code, $opac ); |
| 69 |
return $av; |
|
|
| 70 |
} |
67 |
} |
| 71 |
|
68 |
|
| 72 |
=head2 GetAuthValueDropbox |
69 |
=head2 GetAuthValueDropbox |