when the result has an author as search term, the link contained the <span style="term"> in it

this fix add a author_nospan, that contains the author in it's native form

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Paul POULAIN 2007-11-28 16:00:53 -06:00 committed by Joshua Ferraro
parent 419d9b8f17
commit f5cddc0807
2 changed files with 3 additions and 1 deletions

View File

@ -1012,6 +1012,8 @@ sub searchResults {
$oldbiblio->{summary} = $summary;
}
# add spans to search term in results for search term highlighting
# save a native author, for the <a href=search.lq=<!--tmpl_var name="author"-->> link
$oldbiblio->{'author_nospan'} = $oldbiblio->{'author'};
foreach my $term ( keys %$span_terms_hashref ) {
my $old_term = $term;
if ( length($term) > 3 ) {

View File

@ -256,7 +256,7 @@
<!-- TMPL_ELSE -->
<p>
<!-- TMPL_IF NAME="author" -->
<a href="/cgi-bin/koha/catalogue/search.pl?q=au:<!-- TMPL_VAR NAME="author" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="author" --></a>
<a href="/cgi-bin/koha/catalogue/search.pl?q=au:<!-- TMPL_VAR NAME="author_nospan" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="author" --></a>
<!-- TMPL_ELSE -->
&nbsp;
<!-- /TMPL_IF -->