Bug 9857 - Follow-up - Fix for searches with su= or su:

When the initial search is su=.../su:... the links was
not constructed correctly. With this change, it should
be the case.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
This commit is contained in:
Katrin Fischer 2017-08-18 08:36:59 +00:00 committed by Mason James
parent ce21b3a9d9
commit bf9fde7fa2
2 changed files with 3 additions and 5 deletions

View File

@ -30,8 +30,7 @@ Plugin to get suggestions from Koha's authority file
=cut
use strict;
use warnings;
use Modern::Perl;
use Carp;
use base qw(Koha::SuggestionEngine::Base);

View File

@ -31,8 +31,7 @@ subjects to subject searches.
=cut
use strict;
use warnings;
use Modern::Perl;
use Carp;
use C4::Templates qw(gettemplate); # This is necessary for translatability
@ -86,7 +85,7 @@ sub get_suggestions {
foreach my $index (@indexes) {
my $thissearch = $search;
$thissearch = "$index:$thissearch"
unless ( $thissearch =~ s/OP!/$index=/g );
unless ( $thissearch =~ s/OP!/$index:/g );
$template->{VARS}->{index} = $index;
my $label = $template->output;
push @results,