Bugzilla – Attachment 4178 Details for
Bug 6371
Item Types description not properly displayed if not pure ASCII
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Item-Types-description-not-properly-displayed-if-not.patch (text/plain), 1.37 KB, created by
Frédéric Demians
on 2011-05-19 04:50:03 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2011-05-19 04:50:03 UTC
Size:
1.37 KB
patch
obsolete
>From 52fe9f9da013cb5d273ef5fffc4598e520575b26 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Thu, 19 May 2011 06:54:38 +0200 >Subject: [PATCH] Item Types description not properly displayed if not pure > ASCII > >In several places, C4::ItemType module is used to retrieve item types >and their description. If the description text contains non-ASCII >characters, those characters are not properly displayed. > >This bug can be seen in: > > - 4xx plugin of a UNIMARC DB > - Home > Admin > Item circulation alerts > - others?... >--- > C4/ItemType.pm | 15 +++++++++------ > 1 files changed, 9 insertions(+), 6 deletions(-) > >diff --git a/C4/ItemType.pm b/C4/ItemType.pm >index e66d917..70d2690 100644 >--- a/C4/ItemType.pm >+++ b/C4/ItemType.pm >@@ -73,12 +73,15 @@ C<description>. > sub all { > my ($class) = @_; > my $dbh = C4::Context->dbh; >- return map { $class->new($_) } @{$dbh->selectall_arrayref( >- # The itemtypes table is small enough for >- # `SELECT *` to be harmless. >- "SELECT * FROM itemtypes ORDER BY description", >- { Slice => {} }, >- )}; >+ >+ my @itypes; >+ for ( @{$dbh->selectall_arrayref( >+ "SELECT * FROM itemtypes ORDER BY description", { Slice => {} })} ) >+ { >+ utf8::encode($_->{description}); >+ push @itypes, $class->new($_); >+ } >+ return @itypes; > } > > >-- >1.7.5.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6371
:
4177
|
4178
|
4179
|
4214
|
5772