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

(-)a/C4/Charset.pm (-1 / +1 lines)
Lines 624-630 sub _marc_marc8_to_utf8 { Link Here
624
                    # occurs, upgrade the string in place.  Moral of the story seems to be
624
                    # occurs, upgrade the string in place.  Moral of the story seems to be
625
                    # that pack("U", ...) is better than chr(...) if you need to guarantee
625
                    # that pack("U", ...) is better than chr(...) if you need to guarantee
626
                    # that the resulting string is UTF-8.
626
                    # that the resulting string is UTF-8.
627
                    utf8::upgrade($utf8sf);
627
                    $utf8sf = Encode::encode('UTF-8', $utf8sf);
628
                }
628
                }
629
                push @converted_subfields, $subfield->[0], $utf8sf;
629
                push @converted_subfields, $subfield->[0], $utf8sf;
630
            }
630
            }
(-)a/C4/Templates.pm (-1 / +1 lines)
Lines 125-131 sub output { Link Here
125
        }
125
        }
126
    }
126
    }
127
    my $data;
127
    my $data;
128
#    binmode( STDOUT, ":utf8" );
128
    binmode( STDOUT, ":utf8" );
129
    $template->process( $self->filename, $vars, \$data )
129
    $template->process( $self->filename, $vars, \$data )
130
      || die "Template process failed: ", $template->error();
130
      || die "Template process failed: ", $template->error();
131
    return $data;
131
    return $data;
(-)a/Koha/Template/Plugin/AuthorisedValues.pm (-1 / +7 lines)
Lines 21-27 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 decode};
24
use Encode qw{encode is_utf8};
25
25
26
use C4::Koha;
26
use C4::Koha;
27
27
Lines 63-68 the following TT code: [% AuthorisedValues.GetByCode( 'CATEGORY', 'AUTHORISED_VA Link Here
63
63
64
The parameters are identical to those used by the subroutine C4::Koha::GetAuthorisedValueByCode.
64
The parameters are identical to those used by the subroutine C4::Koha::GetAuthorisedValueByCode.
65
65
66
sub GetByCode {
67
    my ( $self, $category, $code, $opac ) = @_;
68
    my $av = GetAuthorisedValueByCode( $category, $code, $opac );
69
    return $av;
70
}
71
66
=head2 GetAuthValueDropbox
72
=head2 GetAuthValueDropbox
67
73
68
The parameters are identical to those used by the subroutine C4::Koha::GetAuthValueDropbox
74
The parameters are identical to those used by the subroutine C4::Koha::GetAuthValueDropbox
(-)a/Koha/Template/Plugin/Branches.pm (-2 / +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};
24
use Encode qw{encode is_utf8};
25
25
26
use C4::Koha;
26
use C4::Koha;
27
use C4::Context;
27
use C4::Context;
Lines 33-39 sub GetName { Link Here
33
    my $sth   = C4::Context->dbh->prepare($query);
33
    my $sth   = C4::Context->dbh->prepare($query);
34
    $sth->execute($branchcode);
34
    $sth->execute($branchcode);
35
    my $b = $sth->fetchrow_hashref();
35
    my $b = $sth->fetchrow_hashref();
36
    return $b ? encode( 'UTF-8', $b->{'branchname'} ) : q{};
36
    return $b->{branchname};
37
}
37
}
38
38
39
sub GetLoggedInBranchcode {
39
sub GetLoggedInBranchcode {
(-)a/Koha/Template/Plugin/EncodeUTF8.pm (-1 / +1 lines)
Lines 25-31 use Encode qw{encode}; Link Here
25
25
26
sub filter {
26
sub filter {
27
    my ( $self, $value ) = @_;
27
    my ( $self, $value ) = @_;
28
    return encode( 'UTF-8', $value );
28
    return is_utf8( $value ) ? encode( 'UTF-8', $value ) : $value;
29
}
29
}
30
30
31
1;
31
1;
(-)a/Koha/Template/Plugin/ItemTypes.pm (-1 / +1 lines)
Lines 32-38 sub GetDescription { Link Here
32
    my $sth   = C4::Context->dbh->prepare($query);
32
    my $sth   = C4::Context->dbh->prepare($query);
33
    $sth->execute($itemtype);
33
    $sth->execute($itemtype);
34
    my $d = $sth->fetchrow_hashref();
34
    my $d = $sth->fetchrow_hashref();
35
    return encode( 'UTF-8', $d->{'description'} );
35
    return $d->{description}
36
36
37
}
37
}
38
38
(-)a/cataloguing/addbiblio.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use strict;
22
use strict;
23
#use warnings; FIXME - Bug 2505
23
#use warnings; FIXME - Bug 2505
24
use CGI;
24
use CGI q(-utf8);
25
use C4::Output;
25
use C4::Output;
26
use C4::Auth;
26
use C4::Auth;
27
use C4::Biblio;
27
use C4::Biblio;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (-2 / +2 lines)
Lines 99-106 Link Here
99
                 <label for="categorycode">Category: </label><select name="categorycode" id="categorycode">
99
                 <label for="categorycode">Category: </label><select name="categorycode" id="categorycode">
100
        <option value="">Any</option>[% FOREACH categorie IN categories %]
100
        <option value="">Any</option>[% FOREACH categorie IN categories %]
101
        [% IF ( categorie.selected ) %]
101
        [% IF ( categorie.selected ) %]
102
        <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description |html_entity %]</option>[% ELSE %]
102
        <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description %]</option>[% ELSE %]
103
        <option value="[% categorie.categorycode %]">[% categorie.description |html_entity %]</option>[% END %]
103
        <option value="[% categorie.categorycode %]">[% categorie.description %]</option>[% END %]
104
      [% END %]</select>
104
      [% END %]</select>
105
    </p>
105
    </p>
106
    [% END %]
106
    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc (-1 / +1 lines)
Lines 4-10 Link Here
4
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New patron <span class="caret"></span></button>
4
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New patron <span class="caret"></span></button>
5
            <ul class="dropdown-menu">
5
            <ul class="dropdown-menu">
6
                [% IF Koha.Preference('AddPatronLists') == 'categorycode' %]
6
                [% IF Koha.Preference('AddPatronLists') == 'categorycode' %]
7
                    [% FOREACH categorie IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;categorycode=[% categorie.categorycode %]">[% categorie.description | html_entity %]</a></li>[% END %]
7
                    [% FOREACH categorie IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;categorycode=[% categorie.categorycode %]">[% categorie.description %]</a></li>[% END %]
8
                [% ELSE %]
8
                [% ELSE %]
9
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=A">Adult patron</a></li>
9
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=A">Adult patron</a></li>
10
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=C">Child patron</a></li>
10
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=C">Child patron</a></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt (-4 / +3 lines)
Lines 1-6 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE EncodeUTF8 %]
4
3
5
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
6
5
Lines 40-50 Link Here
40
39
41
                            [% ELSIF error == "no_checkout" %]
40
                            [% ELSIF error == "no_checkout" %]
42
41
43
                                <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %]</a> ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> ) is not checked out to a patron.</p>
42
                                <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title %] [% item.biblioitem.subtitle %]</a> ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> ) is not checked out to a patron.</p>
44
43
45
                            [% ELSIF error == "too_many" %]
44
                            [% ELSIF error == "too_many" %]
46
45
47
                                <p>[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %] ( [% item.barcode %] ) has been renewed the maximum number of times by [% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )</p>
46
                                <p>[% item.biblio.title %] [% item.biblioitem.subtitle %] ( [% item.barcode %] ) has been renewed the maximum number of times by [% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )</p>
48
47
49
                                [% IF Koha.Preference('AllowRenewalLimitOverride') %]
48
                                [% IF Koha.Preference('AllowRenewalLimitOverride') %]
50
                                    <form method="post" action="/cgi-bin/koha/circ/renew.pl">
49
                                    <form method="post" action="/cgi-bin/koha/circ/renew.pl">
Lines 121-127 Link Here
121
                    <div class="dialog message">
120
                    <div class="dialog message">
122
                        <h3>Item renewed:</h3>
121
                        <h3>Item renewed:</h3>
123
                        <p>
122
                        <p>
124
                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %]</a>
123
                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title %] [% item.biblioitem.subtitle %]</a>
125
                            ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> )
124
                            ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> )
126
                            renewed for
125
                            renewed for
127
                            [% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )
126
                            [% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-2 / +1 lines)
Lines 136-142 function enableCheckboxActions(){ Link Here
136
          [% CASE %][% line.accounttype %]
136
          [% CASE %][% line.accounttype %]
137
        [%- END -%]
137
        [%- END -%]
138
        [%- IF line.description %], [% line.description %][% END %]
138
        [%- IF line.description %], [% line.description %][% END %]
139
        [% IF line.title %]([% line.title |html %])[% END %]
139
        [% IF line.title %]([% line.title %])[% END %]
140
    </td>
140
    </td>
141
    <td><input type="text" name="payment_note_[% line.accountno %]" /></td>
141
    <td><input type="text" name="payment_note_[% line.accountno %]" /></td>
142
    <td>[% line.accounttype %]</td>
142
    <td>[% line.accounttype %]</td>
143
- 

Return to bug 11944