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

(-)a/Koha/Biblio.pm (-5 / +5 lines)
Lines 1001-1016 sub get_marc_notes { Link Here
1001
    return \@marcnotes;
1001
    return \@marcnotes;
1002
}
1002
}
1003
1003
1004
=head3 get_marc_authors
1004
=head3 get_marc_contributors
1005
1005
1006
    my $authors = $biblio->get_marc_authors;
1006
    my $contributors = $biblio->get_marc_contributors;
1007
1007
1008
Get all authors from the MARC record and returns them in an array.
1008
Get all contributors (but first author) from the MARC record and returns them in an array.
1009
The authors are stored in different fields depending on MARC flavour
1009
They are stored in different fields depending on MARC flavour
1010
1010
1011
=cut
1011
=cut
1012
1012
1013
sub get_marc_authors {
1013
sub get_marc_contributors {
1014
    my ( $self, $params ) = @_;
1014
    my ( $self, $params ) = @_;
1015
1015
1016
    my ( $mintag, $maxtag, $fields_filter );
1016
    my ( $mintag, $maxtag, $fields_filter );
(-)a/basket/basket.pl (-1 / +1 lines)
Lines 68-74 foreach my $biblionumber ( @bibs ) { Link Here
68
    my $dat              = $biblio->unblessed;
68
    my $dat              = $biblio->unblessed;
69
    my $record           = $biblio->metadata->record;
69
    my $record           = $biblio->metadata->record;
70
    my $marcnotesarray   = $biblio->get_marc_notes;
70
    my $marcnotesarray   = $biblio->get_marc_notes;
71
    my $marcauthorsarray = $biblio->get_marc_authors;
71
    my $marcauthorsarray = $biblio->get_marc_contributors;
72
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
72
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
73
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
73
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
74
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
74
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
(-)a/basket/sendbasket.pl (-1 / +1 lines)
Lines 73-79 if ( $email_add ) { Link Here
73
        my $biblio           = Koha::Biblios->find( $biblionumber ) or next;
73
        my $biblio           = Koha::Biblios->find( $biblionumber ) or next;
74
        my $dat              = $biblio->unblessed;
74
        my $dat              = $biblio->unblessed;
75
        my $record           = $biblio->metadata->record({ embed_items => 1 });
75
        my $record           = $biblio->metadata->record({ embed_items => 1 });
76
        my $marcauthorsarray = $biblio->get_marc_authors;
76
        my $marcauthorsarray = $biblio->get_marc_contributors;
77
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
77
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
78
78
79
        my @items = GetItemsInfo( $biblionumber );
79
        my @items = GetItemsInfo( $biblionumber );
(-)a/opac/opac-basket.pl (-1 / +1 lines)
Lines 84-90 foreach my $biblionumber ( @bibs ) { Link Here
84
    $record_processor->process($record);
84
    $record_processor->process($record);
85
    next unless $record;
85
    next unless $record;
86
    my $marcnotesarray   = $biblio->get_marc_notes({ opac => 1 });
86
    my $marcnotesarray   = $biblio->get_marc_notes({ opac => 1 });
87
    my $marcauthorsarray = $biblio->get_marc_authors;
87
    my $marcauthorsarray = $biblio->get_marc_contributors;
88
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
88
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
89
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
89
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
90
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
90
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
(-)a/opac/opac-sendbasket.pl (-1 / +1 lines)
Lines 85-91 if ( $email_add ) { Link Here
85
                patron      => $patron,
85
                patron      => $patron,
86
            }
86
            }
87
        );
87
        );
88
        my $marcauthorsarray = $biblio->get_marc_authors;
88
        my $marcauthorsarray = $biblio->get_marc_contributors;
89
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
89
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
90
90
91
        my @items = GetItemsInfo( $biblionumber );
91
        my @items = GetItemsInfo( $biblionumber );
(-)a/opac/opac-sendshelf.pl (-1 / +1 lines)
Lines 94-100 if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) { Link Here
94
        next unless $record;
94
        next unless $record;
95
        my $fw               = GetFrameworkCode($biblionumber);
95
        my $fw               = GetFrameworkCode($biblionumber);
96
96
97
        my $marcauthorsarray = $biblio->get_marc_authors;
97
        my $marcauthorsarray = $biblio->get_marc_contributors;
98
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
98
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
99
99
100
        my @items = GetItemsInfo( $biblionumber );
100
        my @items = GetItemsInfo( $biblionumber );
(-)a/t/db_dependent/Koha/Biblio.t (-2 / +2 lines)
Lines 881-887 subtest 'current_checkouts() and old_checkouts() tests' => sub { Link Here
881
    $schema->storage->txn_rollback;
881
    $schema->storage->txn_rollback;
882
};
882
};
883
883
884
subtest 'get_marc_authors() tests' => sub {
884
subtest 'get_marc_contributors() tests' => sub {
885
885
886
    plan tests => 1;
886
    plan tests => 1;
887
887
Lines 904-910 subtest 'get_marc_authors() tests' => sub { Link Here
904
    C4::Biblio::ModBiblio( $record, $biblio->biblionumber );
904
    C4::Biblio::ModBiblio( $record, $biblio->biblionumber );
905
    $biblio = Koha::Biblios->find( $biblio->biblionumber );
905
    $biblio = Koha::Biblios->find( $biblio->biblionumber );
906
906
907
    is( 4, @{$biblio->get_marc_authors}, 'get_marc_authors retrieves correct number of author subfields' );
907
    is( 4, @{$biblio->get_marc_contributors}, 'get_marc_contributors retrieves correct number of author subfields' );
908
    $schema->storage->txn_rollback;
908
    $schema->storage->txn_rollback;
909
};
909
};
910
910
(-)a/virtualshelves/sendshelf.pl (-2 / +1 lines)
Lines 80-86 if ($to_address) { Link Here
80
        my $biblio           = Koha::Biblios->find( $biblionumber ) or next;
80
        my $biblio           = Koha::Biblios->find( $biblionumber ) or next;
81
        my $dat              = $biblio->unblessed;
81
        my $dat              = $biblio->unblessed;
82
        my $record           = $biblio->metadata->record({ embed_items => 1 });
82
        my $record           = $biblio->metadata->record({ embed_items => 1 });
83
        my $marcauthorsarray = $biblio->get_marc_authors;
83
        my $marcauthorsarray = $biblio->get_marc_contributors;
84
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
84
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
85
85
86
        my @items = GetItemsInfo($biblionumber);
86
        my @items = GetItemsInfo($biblionumber);
87
- 

Return to bug 29897