Bugzilla – Attachment 152147 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.30 KB, created by
Jonathan Druart
on 2023-06-08 10:55:16 UTC
(
hide
)
Description:
Bug 33952: Koha::Biblio->normalized_isbn
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-06-08 10:55:16 UTC
Size:
1.30 KB
patch
obsolete
>From 7ee43eb8a614c9bee9f988838c76f0ec45afa998 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 > >to squash get_normalized_isbn >--- > Koha/Biblio.pm | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index f8d6fcdff44..d8c1c76a711 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -959,7 +959,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; > } >@@ -1229,6 +1229,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.25.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 33952
:
152146
|
152147
|
152718
|
152719
|
153005
|
153409
|
153410