From 701a861b545e4045c3d5ce6eb943f6a988f847ac Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 27 Mar 2014 09:56:43 +0100 Subject: [PATCH] Bug 11906: The EncodeUTF8 TT Plugin is useless Now, the data from the DB, return by Koha::Database, have the utf-8 flag turn on. It becomes useless to encode them at the template level. The EncodeUTF8 plugin can be removed too. Test plan: 1/ Check out a book with a title containing non-latin characters. 2/ On circ/renew.pl, renew the item. 3/ In some case, you have a warning box, to override a limit. It should not contain broken strings. If you confirm, you get a "Item renewed" box, it should not contain broken strings. Signed-off-by: Jonathan Druart --- Koha/Template/Plugin/EncodeUTF8.pm | 31 -------------------- .../intranet-tmpl/prog/en/modules/circ/renew.tt | 7 ++--- 2 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 Koha/Template/Plugin/EncodeUTF8.pm diff --git a/Koha/Template/Plugin/EncodeUTF8.pm b/Koha/Template/Plugin/EncodeUTF8.pm deleted file mode 100644 index 94fa81a..0000000 --- a/Koha/Template/Plugin/EncodeUTF8.pm +++ /dev/null @@ -1,31 +0,0 @@ -package Koha::Template::Plugin::EncodeUTF8; - -# Copyright Bywater Solutions 2013 - -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 3 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with Koha; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -use Modern::Perl; - -use base qw{Template::Plugin::Filter}; - -use Encode qw{encode}; - -sub filter { - my ( $self, $value ) = @_; - return encode( 'UTF-8', $value ); -} - -1; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt index c7bb1af..503c9f6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt @@ -1,6 +1,5 @@ [% USE Koha %] [% USE KohaDates %] -[% USE EncodeUTF8 %] [% INCLUDE 'doc-head-open.inc' %] @@ -40,11 +39,11 @@ [% ELSIF error == "no_checkout" %] -

[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %] ( [% item.barcode %] ) is not checked out to a patron.

+

[% item.biblio.title %] [% item.biblioitem.subtitle %] ( [% item.barcode %] ) is not checked out to a patron.

[% ELSIF error == "too_many" %] -

[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %] ( [% item.barcode %] ) has been renewed the maximum number of times by [% borrower.firstname %] [% borrower.surname %] ( [% borrower.cardnumber %] )

+

[% item.biblio.title %] [% item.biblioitem.subtitle %] ( [% item.barcode %] ) has been renewed the maximum number of times by [% borrower.firstname %] [% borrower.surname %] ( [% borrower.cardnumber %] )

[% IF Koha.Preference('AllowRenewalLimitOverride') %]
@@ -85,7 +84,7 @@