Bugzilla – Attachment 1815 Details for
Bug 4074
The 'Subject(s)' link(s) are malformed resulting in no search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Corrected patch
0004-4074-Bugfix-The-Subject-s-link-s-are-malformed.patch (text/plain), 2.77 KB, created by
Chris Cormack
on 2010-02-02 13:13:00 UTC
(
hide
)
Description:
Corrected patch
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2010-02-02 13:13:00 UTC
Size:
2.77 KB
patch
obsolete
>From 81c570c9b3880a2d20fe9a8b7c923bb1c1b2320d Mon Sep 17 00:00:00 2001 >From: Chris Nighswonger <cnighswonger@foundations.edu> >Date: Thu, 28 Jan 2010 13:03:02 -0500 >Subject: [PATCH] 4074 Bugfix: The 'Subject(s)' link(s) are malformed resulting in no search results > >This bug was introduced by commit d51332698b2cce43542a58e53fd916df99329158 >which removed the inability to do a search on anything contianing a colon (:). > >This patch expands the regexp to only normalize true limit operators and leave >all other colons (:) intact. >--- > C4/Search.pm | 18 ++++++++++-------- > 1 files changed, 10 insertions(+), 8 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 16c6a55..7e147f1 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -814,7 +814,7 @@ sub getIndexes{ > 'biblionumber', > 'bio', > 'biography', >- 'callnum', >+ 'callnum', > 'cfn', > 'Chronological-subdivision', > 'cn-bib-source', >@@ -927,7 +927,7 @@ sub getIndexes{ > 'Title-uniform-seealso', > 'totalissues', > 'yr', >- >+ > # items indexes > 'acqsource', > 'barcode', >@@ -964,10 +964,10 @@ sub getIndexes{ > 'stack', > 'uri', > 'withdrawn', >- >+ > # subject related > ); >- >+ > return \@indexes; > } > >@@ -1114,11 +1114,11 @@ sub buildQuery { > ) = ( 0, 0, 0, 0, 0 ); > > } >- >+ > if(not $index){ > $index = 'kw'; > } >- >+ > # Set default structure attribute (word list) > my $struct_attr; > unless ( $indexes_set || !$index || $index =~ /(st-|phr|ext|wrdl)/ ) { >@@ -1141,7 +1141,7 @@ sub buildQuery { > if ($auto_truncation){ > unless ( $index =~ /(st-|phr|ext)/ ) { > #FIXME only valid with LTR scripts >- $operand=join(" ",map{ >+ $operand=join(" ",map{ > (index($_,"*")>0?"$_":"$_*") > }split (/\s+/,$operand)); > warn $operand if $DEBUG; >@@ -1305,7 +1305,9 @@ sub buildQuery { > # Normalize the query and limit strings > # This is flawed , means we can't search anything with : in it > # if user wants to do ccl or cql, start the query with that >- $query =~ s/:/=/g; >+# $query =~ s/:/=/g; >+ $query =~ s/(?<=(ti|au|pb|su|an|kw|mc)):/=/g; >+ $query =~ s/(?<=rtrn):/=/g; > $limit =~ s/:/=/g; > for ( $query, $query_desc, $limit, $limit_desc ) { > s/ / /g; # remove extra spaces >-- >1.6.0.4 >
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 4074
:
1813
|
1814
| 1815 |
2762