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

(-)a/Koha/Biblio.pm (-1 / +16 lines)
Lines 1218-1223 sub get_marc_authors { Link Here
1218
    return [@first_authors, @other_authors];
1218
    return [@first_authors, @other_authors];
1219
}
1219
}
1220
1220
1221
=head3 public_read_list
1222
1223
This method returns the list of publicly readable database fields for both API and UI output purposes
1224
1225
=cut
1226
1227
sub public_read_list {
1228
    return [
1229
        'biblionumber',   'frameworkcode',   'author',
1230
        'title',          'medium',          'subtitle',
1231
        'part_number',    'part_name',       'unititle',
1232
        'notes',          'serial',          'seriestitle',
1233
        'copyrightdate',  'abstract'
1234
    ];
1235
}
1221
1236
1222
=head3 to_api
1237
=head3 to_api
1223
1238
Lines 1233-1239 sub to_api { Link Here
1233
    my ($self, $args) = @_;
1248
    my ($self, $args) = @_;
1234
1249
1235
    my $response = $self->SUPER::to_api( $args );
1250
    my $response = $self->SUPER::to_api( $args );
1236
    my $biblioitem = $self->biblioitem->to_api;
1251
    my $biblioitem = $self->biblioitem->to_api( $args );
1237
1252
1238
    return { %$response, %$biblioitem };
1253
    return { %$response, %$biblioitem };
1239
}
1254
}
(-)a/Koha/Biblioitem.pm (-2 / +20 lines)
Lines 30-35 Koha::Biblioitem - Koha Biblioitem Object class Link Here
30
30
31
=head2 Class methods
31
=head2 Class methods
32
32
33
=head3 public_read_list
34
35
This method returns the list of publicly readable database fields for both API and UI output purposes
36
37
=cut
38
39
sub public_read_list {
40
    return [
41
        'volume',           'number',                'isbn',
42
        'issn',             'ean',                   'publicationyear',
43
        'publishercode',    'volumedate',            'columedesc',
44
        'collectiontitle',  'collectionissn',        'collectionvolume',
45
        'editionstatement', 'editionresponsibility', 'pages',
46
        'place',            'lccn',                  'url',
47
        'cn_source',        'cn_class',              'cn)item',
48
        'cn_suffix',        'cn_sort',               'agerestriction',
49
        'totalissues'
50
    ];
51
}
52
33
=head3 to_api_mapping
53
=head3 to_api_mapping
34
54
35
This method returns the mapping for representing a Koha::Biblioitem object
55
This method returns the mapping for representing a Koha::Biblioitem object
Lines 57-63 sub to_api_mapping { Link Here
57
        totalissues      => 'serial_total_issues',
77
        totalissues      => 'serial_total_issues',
58
        volumedate       => 'volume_date',
78
        volumedate       => 'volume_date',
59
        volumedesc       => 'volume_description',
79
        volumedesc       => 'volume_description',
60
61
    };
80
    };
62
}
81
}
63
82
64
- 

Return to bug 30979