Bugzilla – Attachment 150878 Details for
Bug 30979
Add ability for OPAC users to checkout to themselves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32711: Add 'public_read_list' appropriately
Bug-32711-Add-publicreadlist-appropriately.patch (text/plain), 2.81 KB, created by
Martin Renvoize (ashimema)
on 2023-05-09 14:46:26 UTC
(
hide
)
Description:
Bug 32711: Add 'public_read_list' appropriately
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-05-09 14:46:26 UTC
Size:
2.81 KB
patch
obsolete
>From e1c8d99732dafd42a7b45cc7b4e87ecb2a684b74 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 24 Jan 2023 15:00:03 +0000 >Subject: [PATCH] Bug 32711: Add 'public_read_list' appropriately > >We're exposing biblio (and thus biblioitem) to the public API now and as >such we need to explisitely list which fields to include in the response >when called on the public api. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Biblio.pm | 17 ++++++++++++++++- > Koha/Biblioitem.pm | 21 ++++++++++++++++++++- > 2 files changed, 36 insertions(+), 2 deletions(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 50d60c8a69..587eb5af00 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -1218,6 +1218,21 @@ sub get_marc_authors { > return [@first_authors, @other_authors]; > } > >+=head3 public_read_list >+ >+This method returns the list of publicly readable database fields for both API and UI output purposes >+ >+=cut >+ >+sub public_read_list { >+ return [ >+ 'biblionumber', 'frameworkcode', 'author', >+ 'title', 'medium', 'subtitle', >+ 'part_number', 'part_name', 'unititle', >+ 'notes', 'serial', 'seriestitle', >+ 'copyrightdate', 'abstract' >+ ]; >+} > > =head3 to_api > >@@ -1233,7 +1248,7 @@ sub to_api { > my ($self, $args) = @_; > > my $response = $self->SUPER::to_api( $args ); >- my $biblioitem = $self->biblioitem->to_api; >+ my $biblioitem = $self->biblioitem->to_api( $args ); > > return { %$response, %$biblioitem }; > } >diff --git a/Koha/Biblioitem.pm b/Koha/Biblioitem.pm >index eec0cdc637..9cc3a05ca2 100644 >--- a/Koha/Biblioitem.pm >+++ b/Koha/Biblioitem.pm >@@ -30,6 +30,26 @@ Koha::Biblioitem - Koha Biblioitem Object class > > =head2 Class methods > >+=head3 public_read_list >+ >+This method returns the list of publicly readable database fields for both API and UI output purposes >+ >+=cut >+ >+sub public_read_list { >+ return [ >+ 'volume', 'number', 'isbn', >+ 'issn', 'ean', 'publicationyear', >+ 'publishercode', 'volumedate', 'columedesc', >+ 'collectiontitle', 'collectionissn', 'collectionvolume', >+ 'editionstatement', 'editionresponsibility', 'pages', >+ 'place', 'lccn', 'url', >+ 'cn_source', 'cn_class', 'cn)item', >+ 'cn_suffix', 'cn_sort', 'agerestriction', >+ 'totalissues' >+ ]; >+} >+ > =head3 to_api_mapping > > This method returns the mapping for representing a Koha::Biblioitem object >@@ -57,7 +77,6 @@ sub to_api_mapping { > totalissues => 'serial_total_issues', > volumedate => 'volume_date', > volumedesc => 'volume_description', >- > }; > } > >-- >2.40.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30979
:
139131
|
139132
|
139133
|
139134
|
141274
|
141275
|
141276
|
141277
|
141278
|
141279
|
141300
|
145264
|
145265
|
145266
|
145267
|
145268
|
145277
|
145280
|
145281
|
145282
|
145283
|
145284
|
145285
|
145620
|
145621
|
145622
|
145623
|
145624
|
145625
|
145626
|
145627
|
145628
|
145629
|
145630
|
150867
|
150868
|
150869
|
150870
|
150871
|
150872
|
150873
|
150874
|
150875
|
150876
|
150877
|
150878
|
150879
|
150880
|
150881
|
150882
|
150883
|
150884
|
150885
|
150886
|
150887
|
150888
|
150889
|
150967
|
150968
|
150969
|
150970
|
150971
|
150972
|
150973
|
150974
|
151254
|
151255
|
151256
|
151257
|
151258
|
151259
|
151260
|
151261
|
151358
|
151359
|
151360
|
151361
|
151362
|
151363
|
151364
|
151365
|
151368
|
151369
|
151370
|
151371
|
151372
|
151373
|
151374
|
151375
|
151376
|
152789
|
152790
|
152791
|
152792
|
152793
|
152794
|
152795
|
152796
|
152797
|
153459
|
153460
|
153461
|
153462
|
153463
|
153464
|
153465
|
153466
|
153467
|
153500
|
153501
|
153502
|
153503