use Template::Plugin;
use base qw( Template::Plugin );
-use Encode qw{encode is_utf8};
-
use C4::Koha;
sub GetByCode {
my ( $self, $category, $code, $opac ) = @_;
- return encode( 'UTF-8', GetAuthorisedValueByCode( $category, $code, $opac ) );
+ return GetAuthorisedValueByCode( $category, $code, $opac );
}
sub Get {
sub GetByCode {
my ( $self, $category, $code, $opac ) = @_;
- my $av = GetAuthorisedValueByCode( $category, $code, $opac );
- return $av;
+ return GetAuthorisedValueByCode( $category, $code, $opac );
}
=head2 GetAuthValueDropbox
use Template::Plugin;
use base qw( Template::Plugin );
-use Encode qw{encode is_utf8};
use C4::Koha;
use C4::Context;
my $sth = C4::Context->dbh->prepare($query);
$sth->execute($branchcode);
my $b = $sth->fetchrow_hashref();
- return $b->{branchname};
+ return $b ? $b->{'branchname'} : q{};
}
sub GetLoggedInBranchcode {
my $sth = C4::Context->dbh->prepare($query);
$sth->execute($branchcode);
my $b = $sth->fetchrow_hashref();
- return encode( 'UTF-8', $b->{'branchurl'} );
+ return $b->{branchurl};
}
1;