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

(-)a/Koha/Template/Plugin/AuthorisedValues.pm (-3 / +1 lines)
Lines 22-29 use Modern::Perl; Link Here
22
use Template::Plugin;
22
use Template::Plugin;
23
use base qw( Template::Plugin );
23
use base qw( Template::Plugin );
24
24
25
use Encode qw{encode decode};
26
27
use C4::Koha;
25
use C4::Koha;
28
26
29
=pod
27
=pod
Lines 40-46 The parameters are identical to those used by the subroutine C4::Koha::GetAuthor Link Here
40
38
41
sub GetByCode {
39
sub GetByCode {
42
    my ( $self, $category, $code, $opac ) = @_;
40
    my ( $self, $category, $code, $opac ) = @_;
43
    return encode( 'UTF-8', GetAuthorisedValueByCode( $category, $code, $opac ) );
41
    return GetAuthorisedValueByCode( $category, $code, $opac );
44
}
42
}
45
43
46
1;
44
1;
(-)a/Koha/Template/Plugin/Branches.pm (-2 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Template::Plugin;
22
use Template::Plugin;
23
use base qw( Template::Plugin );
23
use base qw( Template::Plugin );
24
use Encode qw{encode decode};
25
24
26
use C4::Koha;
25
use C4::Koha;
27
use C4::Context;
26
use C4::Context;
Lines 33-39 sub GetName { Link Here
33
    my $sth   = C4::Context->dbh->prepare($query);
32
    my $sth   = C4::Context->dbh->prepare($query);
34
    $sth->execute($branchcode);
33
    $sth->execute($branchcode);
35
    my $b = $sth->fetchrow_hashref();
34
    my $b = $sth->fetchrow_hashref();
36
    return $b ? encode( 'UTF-8', $b->{'branchname'} ) : q{};
35
    return $b ? $b->{'branchname'} : q{};
37
}
36
}
38
37
39
sub GetLoggedInBranchcode {
38
sub GetLoggedInBranchcode {
(-)a/Koha/Template/Plugin/ItemTypes.pm (-3 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Template::Plugin;
22
use Template::Plugin;
23
use base qw( Template::Plugin );
23
use base qw( Template::Plugin );
24
use Encode qw{encode decode};
25
24
26
use C4::Koha;
25
use C4::Koha;
27
26
Lines 32-38 sub GetDescription { Link Here
32
    my $sth   = C4::Context->dbh->prepare($query);
31
    my $sth   = C4::Context->dbh->prepare($query);
33
    $sth->execute($itemtype);
32
    $sth->execute($itemtype);
34
    my $d = $sth->fetchrow_hashref();
33
    my $d = $sth->fetchrow_hashref();
35
    return encode( 'UTF-8', $d->{'description'} );
34
    return $d->{'description'};
36
35
37
}
36
}
38
37
39
- 

Return to bug 11944