Bugzilla – Attachment 153410 Details for
Bug 33952
Add Koha::Biblio->normalized_isbn
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33952: Koha::Biblio->normalized_isbn
Bug-33952-KohaBiblio-normalizedisbn.patch (text/plain), 1.49 KB, created by
Nick Clemens (kidclamp)
on 2023-07-13 16:06:58 UTC
(
hide
)
Description:
Bug 33952: Koha::Biblio->normalized_isbn
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-07-13 16:06:58 UTC
Size:
1.49 KB
patch
obsolete
>From 9a64fc7926741ac3b3093795c97c9730ae07e779 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 8 Jun 2023 10:55:36 +0200 >Subject: [PATCH] Bug 33952: Koha::Biblio->normalized_isbn > >This is needed for bug 33947 where we need to call ->normalized_isbn on a Koha::Biblio object. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/Biblio.pm | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 43b53e17b0..1e468c57e7 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -979,7 +979,7 @@ sub custom_cover_image_url { > $url =~ s|{isbn}|$isbn|g; > } > if ( $url =~ m|{normalized_isbn}| ) { >- my $normalized_isbn = C4::Koha::GetNormalizedISBN($self->biblioitem->isbn); >+ my $normalized_isbn = $self->normalized_isbn; > return unless $normalized_isbn; > $url =~ s|{normalized_isbn}|$normalized_isbn|g; > } >@@ -1249,6 +1249,19 @@ sub get_marc_authors { > return [@first_authors, @other_authors]; > } > >+=head3 normalized_isbn >+ >+ my $normalized_isbn = $biblio->normalized_isbn >+ >+Normalizes and returns the first valid ISBN found in the record. >+ISBN13 are converted into ISBN10. This is required to get some book cover images. >+ >+=cut >+ >+sub normalized_isbn { >+ my ( $self) = @_; >+ return C4::Koha::GetNormalizedISBN($self->biblioitem->isbn); >+} > > =head3 to_api > >-- >2.30.2
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 33952
:
152146
|
152147
|
152718
|
152719
|
153005
|
153409
| 153410