Bugzilla – Attachment 152719 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.37 KB, created by
Martin Renvoize (ashimema)
on 2023-06-27 10:25:34 UTC
(
hide
)
Description:
Bug 33952: Koha::Biblio->normalized_isbn
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-06-27 10:25:34 UTC
Size:
1.37 KB
patch
obsolete
>From c3611c0d1a851c10b7a9a0727fafb1d0bfbf9def 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 > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Biblio.pm | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index f8d6fcdff4..d8c1c76a71 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.41.0
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