Bugzilla – Attachment 29789 Details for
Bug 12593
search facets die with regex error if biblio has square brackets in fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12593 - search facets die with regex error if biblio has square brackets in fields
Bug-12593---search-facets-die-with-regex-error-if-.patch (text/plain), 1.21 KB, created by
Dobrica Pavlinusic
on 2014-07-17 10:32:32 UTC
(
hide
)
Description:
Bug 12593 - search facets die with regex error if biblio has square brackets in fields
Filename:
MIME Type:
Creator:
Dobrica Pavlinusic
Created:
2014-07-17 10:32:32 UTC
Size:
1.21 KB
patch
obsolete
>From 67e58fa2b6d8ab8990a47469f4264c06c2210c85 Mon Sep 17 00:00:00 2001 >From: Dobrica Pavlinusic <dpavlin@rot13.org> >Date: Thu, 17 Jul 2014 12:27:55 +0200 >Subject: [PATCH] Bug 12593 - search facets die with regex error if biblio has square brackets in fields > >It's quite common to have [something] within facet data, and it produces following error: > >Unmatched [ in regex; marked by <-- HERE in m/^[ <-- HERE > >This problem was intoduced in Bug 12151 but is trivial to fix. >--- > C4/Search.pm | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 1b5c6fa..219de1e 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -532,7 +532,7 @@ sub getRecords { > foreach my $field (@fields) { > my $data = $field->as_string( $subfield_letters, $facet->{sep} ); > >- unless ( grep { /^$data$/ } @used_datas ) { >+ unless ( grep { /^\Q$data\E$/ } @used_datas ) { > push @used_datas, $data; > $facets_counter->{ $facet->{idx} }->{$data}++; > } >-- >1.7.2.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 12593
:
29789
|
29800
|
29824