View | Details | Raw Unified | Return to bug 28375
Collapse All | Expand All

(-)a/C4/Search.pm (-1 / +1 lines)
Lines 2020-2026 sub searchResults { Link Here
2020
            });
2020
            });
2021
2021
2022
            $record_processor->process($marcrecord);
2022
            $record_processor->process($marcrecord);
2023
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang, $xslt_variables);
2023
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang, $xslt_variables, $search_context->{'interface'} );
2024
        }
2024
        }
2025
2025
2026
        # if biblio level itypes are used and itemtype is notforloan, it can't be reserved either
2026
        # if biblio level itypes are used and itemtype is notforloan, it can't be reserved either
(-)a/C4/XSLT.pm (-2 / +2 lines)
Lines 190-196 sub get_xslt_sysprefs { Link Here
190
}
190
}
191
191
192
sub XSLTParse4Display {
192
sub XSLTParse4Display {
193
    my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang, $variables ) = @_;
193
    my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang, $variables , $interface ) = @_;
194
194
195
    $sysxml ||= C4::Context->preference($xslsyspref);
195
    $sysxml ||= C4::Context->preference($xslsyspref);
196
    $xslfilename ||= C4::Context->preference($xslsyspref);
196
    $xslfilename ||= C4::Context->preference($xslsyspref);
Lines 251-257 sub XSLTParse4Display { Link Here
251
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
251
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
252
252
253
    $variables ||= {};
253
    $variables ||= {};
254
    if (C4::Context->preference('OPACShowOpenURL')) {
254
    if ( $interface eq 'opac' && C4::Context->preference('OPACShowOpenURL')) {
255
        my @biblio_itemtypes;
255
        my @biblio_itemtypes;
256
        my $biblio = Koha::Biblios->find($biblionumber);
256
        my $biblio = Koha::Biblios->find($biblionumber);
257
        if (C4::Context->preference('item-level_itypes')) {
257
        if (C4::Context->preference('item-level_itypes')) {
(-)a/catalogue/detail.pl (-1 / +1 lines)
Lines 147-153 if ( $xslfile ) { Link Here
147
        XSLTBloc           => XSLTParse4Display(
147
        XSLTBloc           => XSLTParse4Display(
148
            $biblionumber, $record, "XSLTDetailsDisplay", 1,
148
            $biblionumber, $record, "XSLTDetailsDisplay", 1,
149
            undef,         $sysxml, $xslfile,             $lang,
149
            undef,         $sysxml, $xslfile,             $lang,
150
            $variables
150
            $variables, 'intranet'
151
        )
151
        )
152
    );
152
    );
153
}
153
}
(-)a/opac/opac-detail.pl (-1 / +1 lines)
Lines 215-221 if ( $xslfile ) { Link Here
215
    $template->param(
215
    $template->param(
216
        XSLTBloc => XSLTParse4Display(
216
        XSLTBloc => XSLTParse4Display(
217
            $biblionumber, $record, "OPACXSLTDetailsDisplay", 1, undef,
217
            $biblionumber, $record, "OPACXSLTDetailsDisplay", 1, undef,
218
            $sysxml, $xslfile, $lang, $variables
218
            $sysxml, $xslfile, $lang, $variables, 'opac'
219
        )
219
        )
220
    );
220
    );
221
}
221
}
(-)a/opac/opac-search.pl (-5 lines)
Lines 702-712 for (my $i=0;$i<@servers;$i++) { Link Here
702
                $res->{'incart'} = 1;
702
                $res->{'incart'} = 1;
703
            }
703
            }
704
704
705
            if (C4::Context->preference('COinSinOPACResults')) {
706
                my $biblio = Koha::Biblios->find( $res->{'biblionumber'} );
707
                # Catch the exception as Koha::Biblio::Metadata->record can explode if the MARCXML is invalid
708
                $res->{coins} = $biblio ? eval {$biblio->get_coins} : q{}; # FIXME This should be moved at the beginning of the @newresults loop
709
            }
710
            if ( C4::Context->preference( "Babeltheque" ) and $res->{normalized_isbn} ) {
705
            if ( C4::Context->preference( "Babeltheque" ) and $res->{normalized_isbn} ) {
711
                if( my $isbn = Business::ISBN->new( $res->{normalized_isbn} ) ) {
706
                if( my $isbn = Business::ISBN->new( $res->{normalized_isbn} ) ) {
712
                    $isbn = $isbn->as_isbn13->as_string;
707
                    $isbn = $isbn->as_isbn13->as_string;
(-)a/opac/opac-shelves.pl (-1 / +1 lines)
Lines 326-332 if ( $op eq 'view' ) { Link Here
326
                        "OPACXSLTListsDisplay", 1,
326
                        "OPACXSLTListsDisplay", 1,
327
                        undef,                  $sysxml,
327
                        undef,                  $sysxml,
328
                        $xslfile,               $lang,
328
                        $xslfile,               $lang,
329
                        $variables
329
                        $variables, 'opac'
330
                    );
330
                    );
331
                }
331
                }
332
332
(-)a/opac/opac-tags.pl (-1 / +1 lines)
Lines 300-306 if ($loggedinuser) { Link Here
300
                "OPACXSLTResultsDisplay", 1,
300
                "OPACXSLTResultsDisplay", 1,
301
                $hidden_items,            $sysxml,
301
                $hidden_items,            $sysxml,
302
                $xslfile,                 $lang,
302
                $xslfile,                 $lang,
303
                $variables
303
                $variables, 'opac'
304
            );
304
            );
305
        }
305
        }
306
306
(-)a/virtualshelves/shelves.pl (-2 / +1 lines)
Lines 265-271 if ( $op eq 'view' ) { Link Here
265
265
266
                if ( $xslfile ) {
266
                if ( $xslfile ) {
267
                    $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "XSLTListsDisplay",
267
                    $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "XSLTListsDisplay",
268
                                                                1, undef, $sysxml, $xslfile, $lang);
268
                                                                1, undef, $sysxml, $xslfile, $lang, undef, 'intranet');
269
                }
269
                }
270
270
271
                my $marcflavour = C4::Context->preference("marcflavour");
271
                my $marcflavour = C4::Context->preference("marcflavour");
272
- 

Return to bug 28375