Bugzilla – Attachment 861 Details for
Bug 2809
Some search problems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
This patch fixes that bug.
0002-Fixes-2-search-problems-Please-Test.patch (text/plain), 2.24 KB, created by
Chris Cormack
on 2008-11-18 20:47:00 UTC
(
hide
)
Description:
This patch fixes that bug.
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2008-11-18 20:47:00 UTC
Size:
2.24 KB
patch
obsolete
>From 10935db2a72882120b23b9fada93799c12a0a17d Mon Sep 17 00:00:00 2001 >From: Henri-Damien LAURENT <henridamien@koha-fr.org> >Date: Mon, 19 May 2008 17:50:47 +0200 >Subject: [PATCH] Fixes 2 search problems : Please Test > >indexes_set was set on yr and date searches. >This lead to search date string in all the fields (index was forgotten) > >If limit was null string, it still added "and". >This caused some searches not to work because there were no parameters. >--- > C4/Search.pm | 16 +++++++++------- > 1 files changed, 9 insertions(+), 7 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 26db95e..f149434 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -950,19 +950,19 @@ sub buildQuery { > # Date of Publication > if ( $index eq 'yr' ) { > $index .= ",st-numeric"; >- $indexes_set++; >+# $indexes_set++; > $stemming = $auto_truncation = $weight_fields = $fuzzy_enabled = $remove_stopwords = 0; > } > > # Date of Acquisition > elsif ( $index eq 'acqdate' ) { > $index .= ",st-date-normalized"; >- $indexes_set++; >+# $indexes_set++; > $stemming = $auto_truncation = $weight_fields = $fuzzy_enabled = $remove_stopwords = 0; > } > # ISBN,ISSN,Standard Number, don't need special treatment > elsif ( $index eq 'nb' || $index eq 'ns' ) { >- $indexes_set++; >+# $indexes_set++; > ( > $stemming, $auto_truncation, > $weight_fields, $fuzzy_enabled, >@@ -1124,10 +1124,12 @@ sub buildQuery { > > # Regular old limits > else { >- $limit .= " and " if $limit || $query; >- $limit .= "$this_limit"; >- $limit_cgi .= "&limit=$this_limit"; >- $limit_desc .= " $this_limit"; >+ if ($this_limit){ >+ $limit .= " and " if $limit || $query; >+ $limit .= "$this_limit"; >+ $limit_cgi .= "&limit=$this_limit"; >+ $limit_desc .= " $this_limit"; >+ } > } > } > if ($group_OR_limits) { >-- >1.6.0.2 >
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 2809
:
861
|
4580