Bug 11410: ensure cataloging search finds results for searches with ampersands
When QueryParser is off, the cataloging search is passing the incorrect variable to SimpleSearch. I'm sure this is causing other issues, but the one I have identified is that any searches with an "&" in them return no results. This patch corrects the bug. Test Plan: 1) Catalog a new record titled "Cats & Dogs" 2) Rebuild your zebra index so this record is indexed 3) Browse to cataloguing/addbooks.pl 4) Search for "Cats & Dogs" 5) Notice you get no results 6) Apply this patch 7) Repeat the search 8) Notice your result now shows up! Signed-off-by: Heather Braum <hbraum@nekls.org> Signed-off-by: Suzanne Fayle <sfayle@roseman.edu> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> This works as described, passes all tests and QA script. Note: Because $query = $builtquery when the QueryParser is used, this problem is only visible when UseQueryParser is set to "Don't try". Signed-off-by: Galen Charlton <gmc@esilibrary.com> (cherry picked from commit2a4e193c24) Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com> (cherry picked from commit0c500f4630) Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
ccbaa6f3c4
commit
d7a7336dff
|
|
@ -82,7 +82,7 @@ if ($query) {
|
|||
}
|
||||
|
||||
# find results
|
||||
my ( $error, $marcresults, $total_hits ) = SimpleSearch($query, $results_per_page * ($page - 1), $results_per_page);
|
||||
my ( $error, $marcresults, $total_hits ) = SimpleSearch($builtquery, $results_per_page * ($page - 1), $results_per_page);
|
||||
|
||||
if ( defined $error ) {
|
||||
$template->param( error => $error );
|
||||
|
|
|
|||
Loading…
Reference in New Issue