Bugzilla – Attachment 112388 Details for
Bug 26614
Diacritics taken into account in facet sorting
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26614 - Diacritics taken into account in facet sorting
Bug-26614---Diacritics-taken-into-account-in-facet.patch (text/plain), 1.08 KB, created by
Ivan Dziuba
on 2020-10-24 11:49:22 UTC
(
hide
)
Description:
Bug 26614 - Diacritics taken into account in facet sorting
Filename:
MIME Type:
Creator:
Ivan Dziuba
Created:
2020-10-24 11:49:22 UTC
Size:
1.08 KB
patch
obsolete
>From aa62c9f9674d5dcf3d47f788f18855f87493f276 Mon Sep 17 00:00:00 2001 >From: Ivan Dziuba <ivan.dziuba@inlibro.com> >Date: Sat, 24 Oct 2020 07:48:07 -0400 >Subject: [PATCH] Bug 26614 - Diacritics taken into account in facet sorting > >--- > C4/Search.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index f2e73ee5a4..f2d0a73eb9 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -40,6 +40,8 @@ use Business::ISBN; > use MARC::Record; > use MARC::Field; > use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG); >+use utf8; >+use Text::Unaccent; > > BEGIN { > $DEBUG = ($ENV{DEBUG}) ? 1 : 0; >@@ -592,7 +594,7 @@ sub getRecords { > # This sorts the facets into alphabetical order > if (@facets_loop) { > foreach my $f (@facets_loop) { >- $f->{facets} = [ sort { uc($a->{facet_label_value}) cmp uc($b->{facet_label_value}) } @{ $f->{facets} } ]; >+ $f->{facets} = [ sort { uc(unac_string("UTF-8", $a->{facet_label_value})) cmp uc(unac_string("UTF-8", $b->{facet_label_value})) } @{ $f->{facets} } ]; > } > } > >-- >2.17.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 26614
:
111259
| 112388