# occurs, upgrade the string in place. Moral of the story seems to be
# that pack("U", ...) is better than chr(...) if you need to guarantee
# that the resulting string is UTF-8.
- utf8::upgrade($utf8sf);
+ $utf8sf = Encode::encode('UTF-8', $utf8sf);
}
push @converted_subfields, $subfield->[0], $utf8sf;
}
}
}
my $data;
-# binmode( STDOUT, ":utf8" );
+ binmode( STDOUT, ":utf8" );
$template->process( $self->filename, $vars, \$data )
|| die "Template process failed: ", $template->error();
return $data;
use Template::Plugin;
use base qw( Template::Plugin );
-use Encode qw{encode decode};
+use Encode qw{encode is_utf8};
use C4::Koha;
The parameters are identical to those used by the subroutine C4::Koha::GetAuthorisedValueByCode.
+sub GetByCode {
+ my ( $self, $category, $code, $opac ) = @_;
+ my $av = GetAuthorisedValueByCode( $category, $code, $opac );
+ return $av;
+}
+
=head2 GetAuthValueDropbox
The parameters are identical to those used by the subroutine C4::Koha::GetAuthValueDropbox
use Template::Plugin;
use base qw( Template::Plugin );
-use Encode qw{encode decode};
+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 ? encode( 'UTF-8', $b->{'branchname'} ) : q{};
+ return $b->{branchname};
}
sub GetLoggedInBranchcode {
sub filter {
my ( $self, $value ) = @_;
- return encode( 'UTF-8', $value );
+ return is_utf8( $value ) ? encode( 'UTF-8', $value ) : $value;
}
1;
my $sth = C4::Context->dbh->prepare($query);
$sth->execute($itemtype);
my $d = $sth->fetchrow_hashref();
- return encode( 'UTF-8', $d->{'description'} );
+ return $d->{description}
}
use strict;
#use warnings; FIXME - Bug 2505
-use CGI;
+use CGI q(-utf8);
use C4::Output;
use C4::Auth;
use C4::Biblio;
<label for="categorycode">Category: </label><select name="categorycode" id="categorycode">
<option value="">Any</option>[% FOREACH categorie IN categories %]
[% IF ( categorie.selected ) %]
- <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description |html_entity %]</option>[% ELSE %]
- <option value="[% categorie.categorycode %]">[% categorie.description |html_entity %]</option>[% END %]
+ <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description %]</option>[% ELSE %]
+ <option value="[% categorie.categorycode %]">[% categorie.description %]</option>[% END %]
[% END %]</select>
</p>
[% END %]
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New patron <span class="caret"></span></button>
<ul class="dropdown-menu">
[% IF Koha.Preference('AddPatronLists') == 'categorycode' %]
- [% FOREACH categorie IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&categorycode=[% categorie.categorycode %]">[% categorie.description | html_entity %]</a></li>[% END %]
+ [% FOREACH categorie IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&categorycode=[% categorie.categorycode %]">[% categorie.description %]</a></li>[% END %]
[% ELSE %]
<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=A">Adult patron</a></li>
<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=C">Child patron</a></li>
[% USE Koha %]
[% USE KohaDates %]
-[% USE EncodeUTF8 %]
[% INCLUDE 'doc-head-open.inc' %]
[% ELSIF error == "no_checkout" %]
- <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 %]&biblionumber=[% item.biblionumber %]&bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> ) is not checked out to a patron.</p>
+ <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 %]&biblionumber=[% item.biblionumber %]&bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> ) is not checked out to a patron.</p>
[% ELSIF error == "too_many" %]
- <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>
+ <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>
[% IF Koha.Preference('AllowRenewalLimitOverride') %]
<form method="post" action="/cgi-bin/koha/circ/renew.pl">
<div class="dialog message">
<h3>Item renewed:</h3>
<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/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title %] [% item.biblioitem.subtitle %]</a>
( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&biblionumber=[% item.biblionumber %]&bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> )
renewed for
[% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )
[% CASE %][% line.accounttype %]
[%- END -%]
[%- IF line.description %], [% line.description %][% END %]
- [% IF line.title %]([% line.title |html %])[% END %]
+ [% IF line.title %]([% line.title %])[% END %]
</td>
<td><input type="text" name="payment_note_[% line.accountno %]" /></td>
<td>[% line.accounttype %]</td>