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

(-)a/Koha/Biblio.pm (-8 / +18 lines)
Lines 426-434 sub host_items { Link Here
426
    elsif ( $marcflavour eq 'UNIMARC' ) {
426
    elsif ( $marcflavour eq 'UNIMARC' ) {
427
        $analyticfield = '461';
427
        $analyticfield = '461';
428
    }
428
    }
429
    my $marc_record = $self->metadata->record;
429
430
    my $record;
431
    $record = eval { $self->metadata->record; };
432
    return if !$record;
433
430
    my @itemnumbers;
434
    my @itemnumbers;
431
    foreach my $field ( $marc_record->field($analyticfield) ) {
435
    foreach my $field ( $record->field($analyticfield) ) {
432
        push @itemnumbers, $field->subfield('9');
436
        push @itemnumbers, $field->subfield('9');
433
    }
437
    }
434
438
Lines 848-854 sub is_serial { Link Here
848
852
849
    return 1 if $self->serial;
853
    return 1 if $self->serial;
850
854
851
    my $record = $self->metadata->record;
855
    my $record;
856
    eval { $record = $self->metadata->record };
857
    return 0 if !$record;
858
852
    return 1 if substr($record->leader, 7, 1) eq 's';
859
    return 1 if substr($record->leader, 7, 1) eq 's';
853
860
854
    return 0;
861
    return 0;
Lines 886-897 sub custom_cover_image_url { Link Here
886
    if ( $url =~ $re ) {
893
    if ( $url =~ $re ) {
887
        my $field = $+{field};
894
        my $field = $+{field};
888
        my $subfield = $+{subfield};
895
        my $subfield = $+{subfield};
889
        my $marc_record = $self->metadata->record;
896
897
        my $record;
898
        eval { $record = $self->metadata->record };
899
        return "" if !$record;
900
890
        my $value;
901
        my $value;
891
        if ( $subfield ) {
902
        if ( $subfield ) {
892
            $value = $marc_record->subfield( $field, $subfield );
903
            $value = $record->subfield( $field, $subfield );
893
        } else {
904
        } else {
894
            my $controlfield = $marc_record->field($field);
905
            my $controlfield = $record->field($field);
895
            $value = $controlfield->data() if $controlfield;
906
            $value = $controlfield->data() if $controlfield;
896
        }
907
        }
897
        return unless $value;
908
        return unless $value;
Lines 948-954 sub get_marc_notes { Link Here
948
959
949
    my $record;
960
    my $record;
950
    eval { $record = $self->metadata->record };
961
    eval { $record = $self->metadata->record };
951
    return if !$record;
962
    return [] if !$record;
952
963
953
    $record = transformMARCXML4XSLT( $self->biblionumber, $record, $opac );
964
    $record = transformMARCXML4XSLT( $self->biblionumber, $record, $opac );
954
965
955
- 

Return to bug 29690