@@ -, +, @@ --- C4/Search.pm | 2 +- C4/XSLT.pm | 4 ++-- catalogue/detail.pl | 2 +- opac/opac-detail.pl | 2 +- opac/opac-search.pl | 5 ----- opac/opac-shelves.pl | 2 +- opac/opac-tags.pl | 2 +- virtualshelves/shelves.pl | 2 +- 8 files changed, 8 insertions(+), 13 deletions(-) --- a/C4/Search.pm +++ a/C4/Search.pm @@ -2020,7 +2020,7 @@ sub searchResults { }); $record_processor->process($marcrecord); - $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang, $xslt_variables); + $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang, $xslt_variables, $search_context->{'interface'} ); } # if biblio level itypes are used and itemtype is notforloan, it can't be reserved either --- a/C4/XSLT.pm +++ a/C4/XSLT.pm @@ -190,7 +190,7 @@ sub get_xslt_sysprefs { } sub XSLTParse4Display { - my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang, $variables ) = @_; + my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang, $variables , $interface ) = @_; $sysxml ||= C4::Context->preference($xslsyspref); $xslfilename ||= C4::Context->preference($xslsyspref); @@ -251,7 +251,7 @@ sub XSLTParse4Display { my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); $variables ||= {}; - if (C4::Context->preference('OPACShowOpenURL')) { + if ( $interface eq 'opac' && C4::Context->preference('OPACShowOpenURL')) { my @biblio_itemtypes; my $biblio = Koha::Biblios->find($biblionumber); if (C4::Context->preference('item-level_itypes')) { --- a/catalogue/detail.pl +++ a/catalogue/detail.pl @@ -147,7 +147,7 @@ if ( $xslfile ) { XSLTBloc => XSLTParse4Display( $biblionumber, $record, "XSLTDetailsDisplay", 1, undef, $sysxml, $xslfile, $lang, - $variables + $variables, 'intranet' ) ); } --- a/opac/opac-detail.pl +++ a/opac/opac-detail.pl @@ -215,7 +215,7 @@ if ( $xslfile ) { $template->param( XSLTBloc => XSLTParse4Display( $biblionumber, $record, "OPACXSLTDetailsDisplay", 1, undef, - $sysxml, $xslfile, $lang, $variables + $sysxml, $xslfile, $lang, $variables, 'opac' ) ); } --- a/opac/opac-search.pl +++ a/opac/opac-search.pl @@ -702,11 +702,6 @@ for (my $i=0;$i<@servers;$i++) { $res->{'incart'} = 1; } - if (C4::Context->preference('COinSinOPACResults')) { - my $biblio = Koha::Biblios->find( $res->{'biblionumber'} ); - # Catch the exception as Koha::Biblio::Metadata->record can explode if the MARCXML is invalid - $res->{coins} = $biblio ? eval {$biblio->get_coins} : q{}; # FIXME This should be moved at the beginning of the @newresults loop - } if ( C4::Context->preference( "Babeltheque" ) and $res->{normalized_isbn} ) { if( my $isbn = Business::ISBN->new( $res->{normalized_isbn} ) ) { $isbn = $isbn->as_isbn13->as_string; --- a/opac/opac-shelves.pl +++ a/opac/opac-shelves.pl @@ -326,7 +326,7 @@ if ( $op eq 'view' ) { "OPACXSLTListsDisplay", 1, undef, $sysxml, $xslfile, $lang, - $variables + $variables, 'opac' ); } --- a/opac/opac-tags.pl +++ a/opac/opac-tags.pl @@ -300,7 +300,7 @@ if ($loggedinuser) { "OPACXSLTResultsDisplay", 1, $hidden_items, $sysxml, $xslfile, $lang, - $variables + $variables, 'opac' ); } --- a/virtualshelves/shelves.pl +++ a/virtualshelves/shelves.pl @@ -265,7 +265,7 @@ if ( $op eq 'view' ) { if ( $xslfile ) { $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "XSLTListsDisplay", - 1, undef, $sysxml, $xslfile, $lang); + 1, undef, $sysxml, $xslfile, $lang, undef, 'intranet'); } my $marcflavour = C4::Context->preference("marcflavour"); --