@@ -, +, @@ searching data 'Uncond"itional?¿' --- catalogue/detail.pl | 7 +++++-- .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 3 ++- .../opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 3 ++- opac/opac-detail.pl | 7 +++++-- 4 files changed, 14 insertions(+), 6 deletions(-) --- a/catalogue/detail.pl +++ a/catalogue/detail.pl @@ -138,7 +138,7 @@ if ( $xslfile ) { my $query = ( C4::Context->preference('UseControlNumber') and $record->field('001') ) ? 'rcn:'. $record->field('001')->data . ' AND (bib-level:a OR bib-level:b)' - : "Host-item:($cleaned_title)"; + : "Host-item:(\"$cleaned_title\")"; my ( $err, $result, $count ); eval { ( $err, $result, $count ) = @@ -153,8 +153,11 @@ if ( $xslfile ) { $template->param( analytics_error => 1 ); } + my $show_analytics_link = defined $count && $count > 0 ? 1 : 0; + my $variables = { - show_analytics_link => defined $count && $count > 0 ? 1 : 0 + show_analytics_link => $show_analytics_link, + ( $show_analytics_link ? ( analytics_query => $cleaned_title ) : () ) }; $template->param( --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -213,6 +213,7 @@ + results_summary analytics Analytics: @@ -222,7 +223,7 @@ /cgi-bin/koha/catalogue/search.pl?q=rcn:+AND+(bib-level:a+OR+bib-level:b) - /cgi-bin/koha/catalogue/search.pl?q=Host-item:() + /cgi-bin/koha/catalogue/search.pl?q=Host-item:("") Show analytics --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -248,6 +248,7 @@ + results_summary analytics Analytics: @@ -257,7 +258,7 @@ /cgi-bin/koha/opac-search.pl?q=rcn:+AND+(bib-level:a+OR+bib-level:b) - /cgi-bin/koha/opac-search.pl?q=Host-item:() + /cgi-bin/koha/opac-search.pl?q=Host-item:("") Show analytics --- a/opac/opac-detail.pl +++ a/opac/opac-detail.pl @@ -195,7 +195,7 @@ if ( $xslfile ) { my $query = ( C4::Context->preference('UseControlNumber') and $record->field('001') ) ? 'rcn:'. $record->field('001')->data . ' AND (bib-level:a OR bib-level:b)' - : "Host-item:($cleaned_title)"; + : "Host-item:(\"$cleaned_title\")"; my ( $err, $result, $count ); eval { ( $err, $result, $count ) = @@ -208,9 +208,12 @@ if ( $xslfile ) { warn "Warning from simple_search_compat: $error"; } + my $show_analytics_link = defined $count && $count > 0 ? 1 : 0; + my $variables = { anonymous_session => ($borrowernumber) ? 0 : 1, - show_analytics_link => defined $count && $count > 0 ? 1 : 0 + show_analytics_link => $show_analytics_link, + ( $show_analytics_link ? ( analytics_query => $cleaned_title ) : () ) }; my @plugin_responses = Koha::Plugins->call( --