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

(-)a/Koha/Biblio.pm (-5 / +5 lines)
Lines 967-982 sub get_marc_notes { Link Here
967
    return \@marcnotes;
967
    return \@marcnotes;
968
}
968
}
969
969
970
=head3 get_marc_authors
970
=head3 get_marc_contributors
971
971
972
    my $authors = $biblio->get_marc_authors;
972
    my $contributors = $biblio->get_marc_contributors;
973
973
974
Get all authors from the MARC record and returns them in an array.
974
Get all contributors (but first author) from the MARC record and returns them in an array.
975
The authors are stored in different fields depending on MARC flavour
975
They are stored in different fields depending on MARC flavour
976
976
977
=cut
977
=cut
978
978
979
sub get_marc_authors {
979
sub get_marc_contributors {
980
    my ( $self, $params ) = @_;
980
    my ( $self, $params ) = @_;
981
981
982
    my ( $mintag, $maxtag, $fields_filter );
982
    my ( $mintag, $maxtag, $fields_filter );
(-)a/basket/basket.pl (-1 / +1 lines)
Lines 69-75 foreach my $biblionumber ( @bibs ) { Link Here
69
    my $dat              = $biblio->unblessed;
69
    my $dat              = $biblio->unblessed;
70
    my $record           = &GetMarcBiblio({ biblionumber => $biblionumber });
70
    my $record           = &GetMarcBiblio({ biblionumber => $biblionumber });
71
    my $marcnotesarray   = $biblio->get_marc_notes({ marcflavour => $marcflavour });
71
    my $marcnotesarray   = $biblio->get_marc_notes({ marcflavour => $marcflavour });
72
    my $marcauthorsarray = $biblio->get_marc_authors;
72
    my $marcauthorsarray = $biblio->get_marc_contributors;
73
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
73
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
74
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
74
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
75
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
75
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
(-)a/basket/sendbasket.pl (-1 / +1 lines)
Lines 75-81 if ( $email_add ) { Link Here
75
        my $record           = GetMarcBiblio({
75
        my $record           = GetMarcBiblio({
76
            biblionumber => $biblionumber,
76
            biblionumber => $biblionumber,
77
            embed_items => 1 });
77
            embed_items => 1 });
78
        my $marcauthorsarray = $biblio->get_marc_authors;
78
        my $marcauthorsarray = $biblio->get_marc_contributors;
79
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
79
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
80
80
81
        my @items = GetItemsInfo( $biblionumber );
81
        my @items = GetItemsInfo( $biblionumber );
(-)a/opac/opac-basket.pl (-1 / +1 lines)
Lines 91-97 foreach my $biblionumber ( @bibs ) { Link Here
91
    $record_processor->process($record);
91
    $record_processor->process($record);
92
    next unless $record;
92
    next unless $record;
93
    my $marcnotesarray   = $biblio->get_marc_notes({ marcflavour => $marcflavour, opac => 1 });
93
    my $marcnotesarray   = $biblio->get_marc_notes({ marcflavour => $marcflavour, opac => 1 });
94
    my $marcauthorsarray = $biblio->get_marc_authors;
94
    my $marcauthorsarray = $biblio->get_marc_contributors;
95
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
95
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
96
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
96
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
97
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
97
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
(-)a/opac/opac-sendbasket.pl (-1 / +1 lines)
Lines 84-90 if ( $email_add ) { Link Here
84
            embed_items  => 1,
84
            embed_items  => 1,
85
            opac         => 1,
85
            opac         => 1,
86
            borcat       => $borcat });
86
            borcat       => $borcat });
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
89
90
        my @items = GetItemsInfo( $biblionumber );
90
        my @items = GetItemsInfo( $biblionumber );
(-)a/opac/opac-sendshelf.pl (-1 / +1 lines)
Lines 93-99 if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) { Link Here
93
        next unless $record;
93
        next unless $record;
94
        my $fw               = GetFrameworkCode($biblionumber);
94
        my $fw               = GetFrameworkCode($biblionumber);
95
95
96
        my $marcauthorsarray = $biblio->get_marc_authors;
96
        my $marcauthorsarray = $biblio->get_marc_contributors;
97
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
97
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
98
98
99
        my @items = GetItemsInfo( $biblionumber );
99
        my @items = GetItemsInfo( $biblionumber );
(-)a/t/db_dependent/Koha/Biblio.t (-2 / +2 lines)
Lines 856-862 subtest 'current_checkouts() and old_checkouts() tests' => sub { Link Here
856
    $schema->storage->txn_rollback;
856
    $schema->storage->txn_rollback;
857
};
857
};
858
858
859
subtest 'get_marc_authors() tests' => sub {
859
subtest 'get_marc_contributors() tests' => sub {
860
860
861
    plan tests => 1;
861
    plan tests => 1;
862
862
Lines 879-885 subtest 'get_marc_authors() tests' => sub { Link Here
879
    C4::Biblio::ModBiblio( $record, $biblio->biblionumber );
879
    C4::Biblio::ModBiblio( $record, $biblio->biblionumber );
880
    $biblio = Koha::Biblios->find( $biblio->biblionumber );
880
    $biblio = Koha::Biblios->find( $biblio->biblionumber );
881
881
882
    is( 4, @{$biblio->get_marc_authors}, 'get_marc_authors retrieves correct number of author subfields' );
882
    is( 4, @{$biblio->get_marc_contributors}, 'get_marc_contributors retrieves correct number of author subfields' );
883
    $schema->storage->txn_rollback;
883
    $schema->storage->txn_rollback;
884
};
884
};
885
885
(-)a/virtualshelves/sendshelf.pl (-2 / +1 lines)
Lines 81-87 if ($to_address) { Link Here
81
        my $record           = GetMarcBiblio({
81
        my $record           = GetMarcBiblio({
82
            biblionumber => $biblionumber,
82
            biblionumber => $biblionumber,
83
            embed_items  => 1 });
83
            embed_items  => 1 });
84
        my $marcauthorsarray = $biblio->get_marc_authors;
84
        my $marcauthorsarray = $biblio->get_marc_contributors;
85
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
85
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
86
86
87
        my @items = GetItemsInfo($biblionumber);
87
        my @items = GetItemsInfo($biblionumber);
88
- 

Return to bug 29897