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

(-)a/C4/XSLT.pm (-3 / +3 lines)
Lines 249-257 sub XSLTParse4Display { Link Here
249
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
249
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
250
250
251
    $variables ||= {};
251
    $variables ||= {};
252
    my $biblio;
252
    if (C4::Context->preference('OPACShowOpenURL')) {
253
    if (C4::Context->preference('OPACShowOpenURL')) {
253
        my @biblio_itemtypes;
254
        my @biblio_itemtypes;
254
        my $biblio = Koha::Biblios->find($biblionumber);
255
        $biblio //= Koha::Biblios->find($biblionumber);
255
        if (C4::Context->preference('item-level_itypes')) {
256
        if (C4::Context->preference('item-level_itypes')) {
256
            @biblio_itemtypes = $biblio->items->get_column("itype");
257
            @biblio_itemtypes = $biblio->items->get_column("itype");
257
        } else {
258
        } else {
Lines 268-274 sub XSLTParse4Display { Link Here
268
    my $partsxml = '';
269
    my $partsxml = '';
269
    # possibly insert component records into Detail views
270
    # possibly insert component records into Detail views
270
    if ($xslsyspref =~ m/Details/) {
271
    if ($xslsyspref =~ m/Details/) {
271
        my $biblio = Koha::Biblios->find( $biblionumber );
272
        $biblio //= Koha::Biblios->find( $biblionumber );
272
        my $components = $biblio->get_marc_analytics(300);
273
        my $components = $biblio->get_marc_analytics(300);
273
        $variables->{show_analytics_link} = ( scalar @{$components} == 0 ) ? 0 : 1;
274
        $variables->{show_analytics_link} = ( scalar @{$components} == 0 ) ? 0 : 1;
274
275
275
- 

Return to bug 11175