Bugzilla – Attachment 5840 Details for
Bug 6989
Patron categories not properly displayed if not pure ASCII
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 6989 Patron categories not properly displayed if not pure ASCII
SIGNED-OFF-Bug-6989-Patron-categories-not-properly.patch (text/plain), 1.55 KB, created by
Piotr Wejman
on 2011-10-11 15:36:12 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 6989 Patron categories not properly displayed if not pure ASCII
Filename:
MIME Type:
Creator:
Piotr Wejman
Created:
2011-10-11 15:36:12 UTC
Size:
1.55 KB
patch
obsolete
>From a3c1355e7856b4f1556be76802dcb8649a1bcd15 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Sat, 8 Oct 2011 15:30:59 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 6989 Patron categories not properly displayed if not pure ASCII >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >C4::Category module returns badly encoded patron categories when they are >containing non pure-ASCII characters. > >To reproduce this bug: > > - Go in Administration > Patron Categories > - Add a new category. Give it this code for example: > Café > - Click on Patrons link on top menu > - Click on New button > > => You get 'Café' displayed without accent > >Signed-off-by: Piotr Wejman <ropuch@bagno.be> >--- > C4/Category.pm | 13 ++++++------- > 1 files changed, 6 insertions(+), 7 deletions(-) > >diff --git a/C4/Category.pm b/C4/Category.pm >index b81e88f..8536128 100644 >--- a/C4/Category.pm >+++ b/C4/Category.pm >@@ -71,13 +71,12 @@ C<description>. > =cut > > sub all { >- my ($class) = @_; >- my $dbh = C4::Context->dbh; >- return map { $class->new($_) } @{$dbh->selectall_arrayref( >- # The categories table is small enough for >- # `SELECT *` to be harmless. >- "SELECT * FROM categories ORDER BY description", >- { Slice => {} }, >+ my $class = shift; >+ map { >+ utf8::encode($_->{description}); >+ $class->new($_); >+ } @{C4::Context->dbh->selectall_arrayref( >+ "SELECT * FROM categories ORDER BY description", { Slice => {} } > )}; > } > >-- >1.7.4.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 6989
:
5796
|
5840
|
5961