Bugzilla – Attachment 39704 Details for
Bug 13231
ISBD/AACR2 punctuation causes double facets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 13231: ISBD/AACR2 punctuation causes double facets
SIGNED-OFF-Bug-13231-ISBDAACR2-punctuation-causes-.patch (text/plain), 1.86 KB, created by
Bernardo Gonzalez Kriegel
on 2015-05-29 19:14:18 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 13231: ISBD/AACR2 punctuation causes double facets
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2015-05-29 19:14:18 UTC
Size:
1.86 KB
patch
obsolete
>From 715c2a52ffec76a91c28740d259d6b5179628e8f Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Fri, 29 May 2015 15:53:31 -0300 >Subject: [PATCH] [SIGNED-OFF] Bug 13231: ISBD/AACR2 punctuation causes double > facets > >(Reworked patch, original from paxed was a diff file) > >Naively remove ISBD punctuation from facets > >Using MARC21, assume the following in one biblio: > 100 1 $aFoo, $ewriter. >And this in another biblio: > 100 1 $aFoo. > >This produces double facets, one of "Foo," >and another for "Foo." - >It should just use one facet, "Foo" > >Attached is a quick hack to achieve this. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Test: >2 records modified as proposed, search by author gives 2 facets >With patch only one >No errors >--- > C4/Search.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 990ed39..d389045 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -514,6 +514,7 @@ sub getRecords { > my $expandable; > my $number_of_facets; > my @this_facets_array; >+ my %used_facets; > for my $one_facet ( > sort { > $facets_counter->{$link_value} >@@ -522,6 +523,9 @@ sub getRecords { > } keys %{ $facets_counter->{$link_value} } > ) > { >+ $one_facet =~ s/([^;:.,]) ?[;:.,]$/$1/; # ISBD/AACR2 punctuation >+ next if (defined($used_facets{$one_facet})); >+ $used_facets{$one_facet} = 1; > $number_of_facets++; > if ( ( $number_of_facets <= 5 ) > || ( $expanded_facet eq $link_value ) >-- >1.7.9.5
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 13231
:
33454
| 39704