@@ -, +, @@ --- Koha/Template/Plugin/AuthorisedValues.pm | 5 +---- Koha/Template/Plugin/Branches.pm | 3 +-- Koha/Template/Plugin/ItemTypes.pm | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) --- a/Koha/Template/Plugin/AuthorisedValues.pm +++ a/Koha/Template/Plugin/AuthorisedValues.pm @@ -22,8 +22,6 @@ use Modern::Perl; use Template::Plugin; use base qw( Template::Plugin ); -use Encode qw{encode is_utf8}; - use C4::Koha; =pod @@ -40,8 +38,7 @@ The parameters are identical to those used by the subroutine C4::Koha::GetAuthor sub GetByCode { my ( $self, $category, $code, $opac ) = @_; - my $av = GetAuthorisedValueByCode( $category, $code, $opac ); - return $av; + return GetAuthorisedValueByCode( $category, $code, $opac ); } 1; --- a/Koha/Template/Plugin/Branches.pm +++ a/Koha/Template/Plugin/Branches.pm @@ -21,7 +21,6 @@ use Modern::Perl; use Template::Plugin; use base qw( Template::Plugin ); -use Encode qw{encode is_utf8}; use C4::Koha; use C4::Context; @@ -33,7 +32,7 @@ sub GetName { 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 { --- a/Koha/Template/Plugin/ItemTypes.pm +++ a/Koha/Template/Plugin/ItemTypes.pm @@ -21,7 +21,6 @@ use Modern::Perl; use Template::Plugin; use base qw( Template::Plugin ); -use Encode qw{encode decode}; use C4::Koha; --