---
opac/opac-detail.pl | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl
index f0a7288..9af15a8 100755
--- a/opac/opac-detail.pl
+++ b/opac/opac-detail.pl
@@ -585,9 +585,9 @@ if (C4::Context->preference('TagsEnabled') and
$tag_quantity = C4::Context->pref
#Search for title in links
if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
- $search_for_title =~ s/{AUTHOR}/$dat->{author}/g;
- $search_for_title =~ s/{TITLE}/$dat->{title}/g;
- $search_for_title =~ s/{ISBN}/$isbn/g;
+ $dat->{author} ? $search_for_title =~ s/{AUTHOR}/$dat->{author}/g :
$search_for_title =~ s/{AUTHOR}//g;
+ $dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g :
$search_for_title =~ s/{TITLE}//g;
+ $isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~
s/{ISBN}//g;
$template->param('OPACSearchForTitleIn' => $search_for_title);
}
--
1.6.0.4
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches