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

(-)a/Koha/Template/Plugin/AuthorisedValues.pm (-5 / +2 lines)
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
(-)a/Koha/Template/Plugin/Branches.pm (-3 / +2 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 is_utf8};
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->{branchname};
35
    return $b ? $b->{'branchname'} : q{};
37
}
36
}
38
37
39
sub GetLoggedInBranchcode {
38
sub GetLoggedInBranchcode {
Lines 51-57 sub GetURL { Link Here
51
    my $sth   = C4::Context->dbh->prepare($query);
50
    my $sth   = C4::Context->dbh->prepare($query);
52
    $sth->execute($branchcode);
51
    $sth->execute($branchcode);
53
    my $b = $sth->fetchrow_hashref();
52
    my $b = $sth->fetchrow_hashref();
54
    return encode( 'UTF-8', $b->{'branchurl'} );
53
    return $b->{branchurl};
55
}
54
}
56
55
57
1;
56
1;
(-)a/Koha/Template/Plugin/ItemTypes.pm (-2 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
28
- 

Return to bug 11944