Bugzilla – Attachment 33454 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]
Naively remove ISBD punctuation from facets
naively_remove_isbd_punct_from_facets.diff (text/plain), 1.02 KB, created by
paxed
on 2014-11-11 10:14:18 UTC
(
hide
)
Description:
Naively remove ISBD punctuation from facets
Filename:
MIME Type:
Creator:
paxed
Created:
2014-11-11 10:14:18 UTC
Size:
1.02 KB
patch
obsolete
>diff --git a/C4/Search.pm b/C4/Search.pm >index 1326f69..237a10c 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -515,6 +515,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} >@@ -523,6 +524,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 )
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