Bug 9857: Did you mean? uses wrong punctuation in search links

The link changes the search links generated by the plugins
from an=authid to an:authid, as suggested by Jared on the
bug report.

- Turn on the AuthorityFile und ExplodedTerms  plugins
  for the OPAC from the "Did you mean" section of the
  administration module
- Search a term in your OPAC where one or several
  authorities exist.
  A last name or a place name might work well.
- Verify that there are suggestions displayed on top of
  your result list.
- Verify that the link created is something like:
  /cgi-bin/koha/opac-search.pl?q=an=14084
- Apply patch.
- Verify the link has changed a little and still works
  correctly:
  /cgi-bin/koha/opac-search.pl?q=an:14084

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Katrin Fischer 2015-12-04 01:17:50 +01:00 committed by Jonathan Druart
parent 515e629928
commit d0e3891e25
2 changed files with 2 additions and 2 deletions

View file

@ -94,7 +94,7 @@ sub get_suggestions {
foreach my $auth (@$searchresults) {
push @results,
{
'search' => "an=$auth->{'authid'}",
'search' => "an:$auth->{'authid'}",
relevance => $count--,
label => $auth->{summary}->{authorized}->[0]->{heading}
};

View file

@ -85,7 +85,7 @@ sub get_suggestions {
my @results;
foreach my $index (@indexes) {
my $thissearch = $search;
$thissearch = "$index=$thissearch"
$thissearch = "$index:$thissearch"
unless ( $thissearch =~ s/OP!/$index=/g );
$template->{VARS}->{index} = $index;
my $label = $template->output;