Bug 11944: Fix encoding issue in C4::ItemType

There is no need to encode strings coming from DB.

To reproduce:
go on admin/item_circulation_alerts.pl
The headers contain bad encoded characters.

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Jonathan Druart 2014-05-14 11:20:21 +02:00 committed by Tomas Cohen Arazi
parent 1db6f0d332
commit 7431f8cfe2
2 changed files with 0 additions and 13 deletions

View File

@ -82,7 +82,6 @@ sub all {
for ( @{$dbh->selectall_arrayref(
"SELECT * FROM itemtypes ORDER BY description", { Slice => {} })} )
{
$_->{description} = Encode::encode('UTF-8', $_->{description});
push @itypes, $class->new($_);
}
return @itypes;
@ -105,9 +104,6 @@ sub get {
my $data = $dbh->selectrow_hashref(
"SELECT * FROM itemtypes WHERE itemtype = ?", undef, $itemtype
);
if ( $data->{description} ) {
$data->{description} = Encode::encode('UTF-8', $data->{description});
}
return $class->new($data);
}

View File

@ -35,15 +35,6 @@ use C4::Output;
# shortcut for long package name
our $preferences = 'C4::ItemCirculationAlertPreference';
# utf8 filter
sub utf8 {
my ($data, @keys) = @_;
for (@keys) {
$data->{$_} = decode('utf8', $data->{$_});
}
$data;
}
# prepend "br_" to column name and replace spaces with "<br/>"
sub br {
my ($data, @keys) = @_;