[Koha-bugs] [Bug 20458] New: Improper substitution of QUERY_KW in opac/opac-search.pl
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Mar 21 17:15:44 CET 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20458
Bug ID: 20458
Summary: Improper substitution of QUERY_KW in
opac/opac-search.pl
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Searching
Assignee: koha-bugs at lists.koha-community.org
Reporter: barton at bywatersolutions.com
QA Contact: testopia at bugs.koha-community.org
If the system preference OPACNoResultsFound is enabled, all occurrences of the
string {QUERY_KW} should be replaced with the query string if the query returns
no results.
In opac/opac-search.pl, the regular expression that we're using to remove the
keywords 'and' and 'or' isn't properly grouped:
(my $query_kw=$query_desc)=~s/ and|or / /g;
will replace ' and' or 'or '; this should be
(my $query_kw=$query_desc)=~s/ (and|or) / /g;
To reproduce:
Put "{QUERY_KW}" into
OPACNoResultsFound
Then do an opac search for
soy andina
or
tractor trailer
as long as neither of these is actually found, OPACNoResultsFound will show
soy ina
or
tract trailer
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list